11#! /usr/bin/env bash
22
3- # Needs two arguments:
3+ # Needs these arguments:
44#
55# 1. is_seedcase_project: true or false
66# 2. hosting_provider: e.g., "github", "gitlab", etc.
@@ -16,17 +16,16 @@ if [ -z "$is_seedcase_project" ] || [ -z "$hosting_provider" ]; then
1616fi
1717
1818# Set up variables and functions for the test -----
19- test_name=" test-package -$hosting_provider "
20- test_dir=" $( pwd) /_temp/$is_seedcase_project /$test_name "
19+ test_name=" $is_seedcase_project -$hosting_provider "
20+ test_dir=" $( pwd) /_temp/auto /$test_name "
2121template_dir=" $( pwd) "
2222
2323# Needs three arguments:
2424#
2525# 1. Template directory
2626# 2. Destination directory
27- # 3. VCS ref (commit, branch, tag, etc.)
2827copy () {
29- # ` -r HEAD` means to copy from the current HEAD, including uncommitted changes
28+ # ' -r HEAD' means use the HEAD, including uncommitted changes.
3029 uvx copier copy $1 $2 \
3130 -r HEAD \
3231 --defaults \
@@ -38,9 +37,7 @@ copy () {
3837 --data author_email=" first.last@example.com" \
3938 --data review_team=" @first-last/developers" \
4039 --data github_board_number=22 \
41- --overwrite \
42- --skip-tasks \
43- --trust
40+ --overwrite
4441}
4542
4643# Pre-test setup -----
@@ -60,7 +57,7 @@ echo "Testing copy for new projects when: 'is_seedcase_project'='$is_seedcase_pr
6057 git commit --quiet -m " test: initial copy" &&
6158 # Check that recopy works -----
6259 echo " Testing recopy when: 'is_seedcase_project'='$$ is_seedcase_project', 'hosting_provider'='$hosting_provider ' -----------" &&
63- rm .cz.toml &&
60+ rm .gitignore &&
6461 git add . &&
6562 git commit --quiet -m " test: preparing to recopy from the template" &&
6663 uvx copier recopy \
@@ -69,12 +66,10 @@ echo "Testing copy for new projects when: 'is_seedcase_project'='$is_seedcase_pr
6966 --overwrite \
7067 --skip-tasks \
7168 --trust &&
72- # Check that copying onto an existing package works -----
69+ # Check that copying onto an existing project works -----
7370 echo " Testing copy in existing projects when: 'is_seedcase_project'='$is_seedcase_project ', 'hosting_provider'='$hosting_provider ' -----------" &&
74- rm .cz.toml .copier-answers.yml &&
71+ rm .gitignore .copier-answers.yml &&
7572 git add . &&
76- git commit --quiet -m " test: preparing to copy onto an existing package" &&
77- copy $template_dir $test_dir # &&
78- # Checks and builds -----
79- # just run-all
73+ git commit --quiet -m " test: preparing to copy onto an existing project" &&
74+ copy $template_dir $test_dir
8075)
0 commit comments