-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopier.yml
69 lines (58 loc) · 1.81 KB
/
copier.yml
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
67
68
69
_templates_suffix: .jinja
_subdirectory: project
_envops:
keep_trailing_newline: true
name:
type: str
help: What is the name of the author?
email:
type: str
help: Preferred email address?
year:
type: int
help: What Year is this for?
project_name:
type: str
help: What would you like this project to be named?
default: "aoc{{ year }}"
project_slug:
type: str
help: "Project slug (used for GitHub, PyPI, etc.)"
default: "{{ project_name.lower().replace(' ', '-') }}"
package_name:
type: str
help: "The name of the main Python package (should be a valid Python identifier)"
default: "{{ project_slug.replace('-', '_') }}"
session_cookie:
type: str
secret: true
help: What is the session cookie for your Advent of Code account?
git_init:
type: bool
help: Initialize and make a commit in a new a git repo?
default: true
rye_sync:
type: bool
help: Run rye sync to create virtual environment?
default: no
install_pre_commit:
type: bool
help: "Install pre-commit?"
default: no
when: "{% if rye_sync %}true{% endif %}"
setup_gh_remote:
type: bool
help: Setup and push repository
when: "{% if git_init %}true{% endif %}"
default: no
github_username:
type: str
help: What's your github.com username?
when: "{% if setup_gh_remote %}true{% endif %}"
_tasks:
- "{% if rye_sync %}rye sync{% endif %}"
- "{% if git_init %}git init{% endif %}"
- "{% if git_init %}git add .{% endif %}"
- "{% if git_init %}git commit -m ':tada: Initial Commit :tada:'{% endif %}"
- "{% if install_pre_commit %}rye run pre-commit install{% endif %}"
- "{% if setup_gh_remote %}gh repo create {{ github_username }}/aoc{{year}} -d 'Advent of Code {{year}}' --public --remote=origin --source=. --push{% endif %}"