Skip to content

Commit

Permalink
Fetch full history
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter committed Feb 27, 2024
1 parent 308f6d0 commit 2a5d856
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/scripts/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
result = run(command, shell=True, capture_output=True)
if result.returncode != 0:
print(f"Failed to run {command} with error {result.returncode}:\n{result.stderr.decode(encoding='utf-8')}")
exit(result.returncode)

version = result.stdout.decode(encoding="utf-8").strip()
print(version)
# Our tagging convention is v{version_year}_{version_month}
# git describe will sometimes return something like v2024_02-5-g5f0770a64e
version_year = int(version.split("_")[0][1:]) # Split the year and month based on the '_', and strip off the leading 'v'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/update_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v2.3.3
Expand Down

0 comments on commit 2a5d856

Please sign in to comment.