From bb2adac9dfb6a4d4472177a476f6a9aa20ac3b59 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Sun, 17 Nov 2024 11:36:54 +1100 Subject: [PATCH] Added more items to `.gitattributes`. --- .gitattributes | 4 ++++ init.sh | 1 + tests/scaffold/_assert_init.bash | 4 ++++ tests/scaffold/functional.init.bats | 1 + 4 files changed, 10 insertions(+) diff --git a/.gitattributes b/.gitattributes index 71fcf50..d5653e9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,7 +12,11 @@ # /phpmd.xml export-ignore # /phpstan.neon export-ignore # /phpunit.xml export-ignore +# /rector.php export-ignore #;> PHP #;< NODEJS # /.npmignore export-ignore #;> NODEJS +#;< RENOVATE +# /renovate.json export-ignore +#;> RENOVATE diff --git a/init.sh b/init.sh index fff3708..431fe65 100755 --- a/init.sh +++ b/init.sh @@ -244,6 +244,7 @@ remove_pr_template() { remove_renovate() { rm -f renovate.json || true rm -Rf docs/content/ci/renovate.mdx || true + remove_tokens_with_content "RENOVATE" } remove_docs() { diff --git a/tests/scaffold/_assert_init.bash b/tests/scaffold/_assert_init.bash index 7520fc4..f33c3b4 100644 --- a/tests/scaffold/_assert_init.bash +++ b/tests/scaffold/_assert_init.bash @@ -73,6 +73,7 @@ assert_files_present_php() { assert_file_not_contains ".gitattributes" "# /phpmd.xml" assert_file_not_contains ".gitattributes" "# /phpstan.neon" assert_file_not_contains ".gitattributes" "# /phpunit.xml" + assert_file_not_contains ".gitattributes" "# /rector.php" assert_file_exists ".github/workflows/test-php.yml" assert_file_exists ".github/workflows/release-php.yml" @@ -83,6 +84,7 @@ assert_files_present_php() { assert_file_exists "phpmd.xml" assert_file_exists "phpstan.neon" assert_file_exists "phpunit.xml" + assert_file_exists "rector.php" assert_dir_exists "tests/phpunit" assert_dir_not_contains_string "${dir}" "YourNamespace" @@ -106,6 +108,7 @@ assert_files_absent_php() { assert_file_not_contains ".gitattributes" "/phpmd.xml" assert_file_not_contains ".gitattributes" "/phpstan.neon" assert_file_not_contains ".gitattributes" "/phpunit.xml" + assert_file_not_contains ".gitattributes" "/rector.php" assert_file_not_exists ".github/workflows/test-php.yml" assert_file_not_exists ".github/workflows/release-php.yml" @@ -116,6 +119,7 @@ assert_files_absent_php() { assert_file_not_exists "phpmd.xml" assert_file_not_exists "phpstan.neon" assert_file_not_exists "phpunit.xml" + assert_file_not_exists "rector.php" assert_dir_not_exists "tests/phpunit" assert_files_absent_php_command "${dir}" diff --git a/tests/scaffold/functional.init.bats b/tests/scaffold/functional.init.bats index 9e83b57..5e39416 100644 --- a/tests/scaffold/functional.init.bats +++ b/tests/scaffold/functional.init.bats @@ -474,6 +474,7 @@ export SCRIPT_FILE="init.sh" assert_files_present_shell "${BUILD_DIR}" assert_file_not_exists "renovate.json" + assert_file_not_contains ".gitattributes" "renovate" assert_output_contains "Initialization complete." }