-
Notifications
You must be signed in to change notification settings - Fork 0
/
copier.yml
45 lines (43 loc) · 1.1 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
# configuration
_subdirectory: template
_min_copier_version: '9.1.1'
# questions
tool:
type: str
help: What is the name of the tool?
validator: >-
{% if entry == '' %}
Please provide a valid tool name
{% endif %}
url:
type: str
help: What is the URL of the tool?
validator: >-
{% if not url.startswith('https://') %}
Please provide a URL
{% endif %}
entry:
type: str
help: What is the pre-commit entry (for example `ruff --fix --exit-non-zero-on-fix`)?
default: '{{ tool }}'
validator: >-
{% if entry == '' %}
Please provide an entry
{% endif %}
conda_package:
type: str
help: What is the conda package name?
default: '{{ tool }}'
validator: >-
{% if conda_package == '' %}
Please provide a conda package name
{% endif %}
description:
type: str
help: What is the description of the tool?
default: This hook runs {{ tool }}.
_tasks:
- sed -i.bak "s/TOOL_VERSION/$(micromamba search -c conda-forge {{ conda_package }} --json | jq -r '.result.pkgs[0].version')/g" environment.yml
- rm environment.yml.bak
- git init
- git branch -M main