19
19
test_name=" test-package-$hosting_provider "
20
20
test_dir=" $( pwd) /_temp/$is_seedcase_project /$test_name "
21
21
template_dir=" $( pwd) "
22
- # Use the latest commit for the template
23
- commit=$( git rev-parse HEAD)
24
22
25
23
# Needs three arguments:
26
24
#
27
25
# 1. Template directory
28
26
# 2. Destination directory
29
27
# 3. VCS ref (commit, branch, tag, etc.)
30
28
copy () {
31
- # vcs-ref means the current commit/head, not a tag.
29
+ # `-r HEAD` means to copy from the current HEAD, including uncommitted changes
32
30
uvx copier copy $1 $2 \
33
- --vcs-ref= $3 \
31
+ -r HEAD \
34
32
--defaults \
35
33
--data is_seedcase_project=$is_seedcase_project \
36
34
--data github_user=" first-last" \
@@ -56,7 +54,7 @@ mkdir -p $test_dir
56
54
echo " Testing copy for new projects when: 'is_seedcase_project'='$is_seedcase_project ', 'hosting_provider'='$hosting_provider ' -----------"
57
55
(
58
56
cd $test_dir &&
59
- copy $template_dir $test_dir $commit &&
57
+ copy $template_dir $test_dir &&
60
58
git init -b main &&
61
59
git add . &&
62
60
git commit --quiet -m " test: initial copy" &&
@@ -66,7 +64,7 @@ echo "Testing copy for new projects when: 'is_seedcase_project'='$is_seedcase_pr
66
64
git add . &&
67
65
git commit --quiet -m " test: preparing to recopy from the template" &&
68
66
uvx copier recopy \
69
- --vcs-ref= $commit \
67
+ -r HEAD \
70
68
--defaults \
71
69
--overwrite \
72
70
--skip-tasks \
@@ -76,7 +74,7 @@ echo "Testing copy for new projects when: 'is_seedcase_project'='$is_seedcase_pr
76
74
rm .cz.toml .copier-answers.yml &&
77
75
git add . &&
78
76
git commit --quiet -m " test: preparing to copy onto an existing package" &&
79
- copy $template_dir $test_dir $commit # &&
77
+ copy $template_dir $test_dir # &&
80
78
# Checks and builds -----
81
79
# just run-all
82
80
)
0 commit comments