diff --git a/test-template.sh b/test-template.sh index 33f9ad2..f1843e4 100644 --- a/test-template.sh +++ b/test-template.sh @@ -19,8 +19,6 @@ fi test_name="test-package-$hosting_provider" test_dir="$(pwd)/_temp/$is_seedcase_project/$test_name" template_dir="$(pwd)" -# Use the latest commit for the template -commit=$(git rev-parse HEAD) # Needs three arguments: # @@ -28,9 +26,9 @@ commit=$(git rev-parse HEAD) # 2. Destination directory # 3. VCS ref (commit, branch, tag, etc.) copy () { - # vcs-ref means the current commit/head, not a tag. + # `-r HEAD` means to copy from the current HEAD, including uncommitted changes uvx copier copy $1 $2 \ - --vcs-ref=$3 \ + -r HEAD \ --defaults \ --data is_seedcase_project=$is_seedcase_project \ --data github_user="first-last" \ @@ -56,7 +54,7 @@ mkdir -p $test_dir echo "Testing copy for new projects when: 'is_seedcase_project'='$is_seedcase_project', 'hosting_provider'='$hosting_provider' -----------" ( cd $test_dir && - copy $template_dir $test_dir $commit && + copy $template_dir $test_dir && git init -b main && git add . && git commit --quiet -m "test: initial copy" && @@ -66,7 +64,7 @@ echo "Testing copy for new projects when: 'is_seedcase_project'='$is_seedcase_pr git add . && git commit --quiet -m "test: preparing to recopy from the template" && uvx copier recopy \ - --vcs-ref=$commit \ + -r HEAD \ --defaults \ --overwrite \ --skip-tasks \ @@ -76,7 +74,7 @@ echo "Testing copy for new projects when: 'is_seedcase_project'='$is_seedcase_pr rm .cz.toml .copier-answers.yml && git add . && git commit --quiet -m "test: preparing to copy onto an existing package" && - copy $template_dir $test_dir $commit #&& + copy $template_dir $test_dir #&& # Checks and builds ----- # just run-all )