-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (62 loc) · 2.63 KB
/
Copy pathMakefile
File metadata and controls
66 lines (62 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
SHELL := bash
.PHONY: test-template-render test-template-render-github test-template-render-gitlab
test-template-render: test-template-render-github test-template-render-gitlab
# Validate GitHub-scaffolded output and task-runner pruning.
test-template-render-github:
@set -euo pipefail; \
out_dir="$$(mktemp -d /tmp/scaf-template-github-XXXXXX)"; \
copier copy . "$$out_dir" --trust --defaults \
-d copier__project_name_raw="Sample GitHub Template" \
-d copier__project_slug="sample_github_template" \
-d copier__description="Sample github generated project" \
-d copier__author_name="Sample Author" \
-d copier__domain_name="example.com" \
-d copier__email="sample@example.com" \
-d copier__timezone="America/New_York" \
-d copier__use_celery=true \
-d copier__use_sentry=true \
-d copier__configure_repo=false \
-d copier__version="0.1.0" \
-d copier__ci_provider="github" \
-d copier__enable_semantic_release=false \
-d copier__github_semantic_release_auth="github_token" \
-d copier__enable_secret_scanning=true \
-d copier__task_runner="task"; \
test -f "$$out_dir/README.md"; \
test -f "$$out_dir/.copier-answers.yml"; \
test -f "$$out_dir/Taskfile.yml"; \
test ! -f "$$out_dir/Makefile"; \
test ! -f "$$out_dir/justfile"; \
test -f "$$out_dir/.github/workflows/template-correctness.yaml"; \
test -f "$$out_dir/.github/workflows/secret-scan.yaml"; \
test ! -f "$$out_dir/.github/workflows/semantic-release.yaml"; \
test ! -f "$$out_dir/.gitlab-ci.yml"; \
rm -rf "$$out_dir"
# Validate GitLab-scaffolded output and task-runner pruning.
test-template-render-gitlab:
@set -euo pipefail; \
out_dir="$$(mktemp -d /tmp/scaf-template-gitlab-XXXXXX)"; \
copier copy . "$$out_dir" --trust --defaults \
-d copier__project_name_raw="Sample GitLab Template" \
-d copier__project_slug="sample_gitlab_template" \
-d copier__description="Sample gitlab generated project" \
-d copier__author_name="Sample Author" \
-d copier__domain_name="example.com" \
-d copier__email="sample@example.com" \
-d copier__timezone="America/New_York" \
-d copier__use_celery=false \
-d copier__use_sentry=false \
-d copier__configure_repo=false \
-d copier__version="0.1.0" \
-d copier__ci_provider="gitlab" \
-d copier__enable_semantic_release=false \
-d copier__enable_secret_scanning=true \
-d copier__task_runner="just"; \
test -f "$$out_dir/README.md"; \
test -f "$$out_dir/.copier-answers.yml"; \
test -f "$$out_dir/justfile"; \
test ! -f "$$out_dir/Makefile"; \
test ! -f "$$out_dir/Taskfile.yml"; \
test -f "$$out_dir/.gitlab-ci.yml"; \
test ! -d "$$out_dir/.github"; \
rm -rf "$$out_dir"