Skip to content

Commit 4ce9892

Browse files
authored
fix: Ensure tags are available in the initial pipeline (#94)
1 parent 5eaa31f commit 4ce9892

7 files changed

Lines changed: 121 additions & 117 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
repos:
33
- repo: https://github.com/seisollc/goat
4-
rev: 593455973b31d1e57474e10ee009668811d68602
4+
rev: deeb57f94559e73a68e1ac8af80ff14c936565b9 # frozen: v2023.08.20
55
hooks:
66
- id: seiso-lint

Pipfile.lock

Lines changed: 110 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ python3 -m pip install --upgrade pipx gitpython pyyaml
1010
python3 -m pipx ensurepath
1111
pipx install pipenv
1212

13-
# Initialize your project either with HTTP or SSH
14-
# Uses HTTP
13+
# Initialize your project with *either* HTTP or SSH
14+
# HTTP
1515
pipx run --system-site-packages cookiecutter gh:seisollc/cookiecutter-python
16-
# Uses SSH
16+
# SSH
1717
pipx run --system-site-packages cookiecutter git+ssh://git@github.com/seisollc/cookiecutter-python.git
1818

1919
# Enter the project directory
@@ -26,7 +26,7 @@ need to create it. Once it exists, you can continue.
2626
```bash
2727
# Push the initial commit (IMPORTANT!)
2828
git remote add origin git@github.com:SeisoLLC/$(basename $(pwd)).git
29-
git push origin $(git branch --show-current)
29+
git push origin $(git branch --show-current) --follow-tags
3030
```
3131

3232
After you've pushed the initial commit, you should setup your repository settings - such as setting a branch policy, enabling dependabot, adding docker hub

hooks/post_gen_project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ def run_post_gen_hook():
182182
# The cookiecutter lines are wrapped in quotes to avoid parsing issues
183183
# with certain linters.
184184
"{% if cookiecutter.versioning == 'SemVer-ish' -%}" # type: ignore
185-
subprocess.run(["git", "tag", "v0.0.0"], capture_output=True, check=True)
185+
subprocess.run(["git", "tag", "-a", "v0.0.0", "-m", "Initial project generation"], capture_output=True, check=True)
186186
"{% elif cookiecutter.versioning == 'CalVer' -%}" # type: ignore
187-
subprocess.run(["git", "tag", "v{% now 'local', '%Y.%m.00' %}"], capture_output=True, check=True)
187+
subprocess.run(["git", "tag", "-a", "v{% now 'local', '%Y.%m.00' %}", "-m", "Initial project generation"], capture_output=True, check=True)
188188
"{% endif %}" # type: ignore
189189
# fmt: on
190190
##############

{{cookiecutter.project_name|replace(" ", "")}}/.github/workflows/commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
steps:
4040
- name: Checkout the repository
4141
uses: actions/checkout@v3
42+
with:
43+
fetch-depth: 0
4244
- name: Setup python
4345
uses: actions/setup-python@v4
4446
with:

{{cookiecutter.project_name|replace(" ", "")}}/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.task/*
22
sbom.*.json
33
vulns.*.json
4+
seiso_{{ cookiecutter.project_slug }}_*.tar
45

56
# Created by https://www.toptal.com/developers/gitignore/api/vim,emacs,visualstudiocode,python,macos,windows
67
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,emacs,visualstudiocode,python,macos,windows

0 commit comments

Comments
 (0)