Skip to content

Commit

Permalink
fix: version generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Laikulo committed Nov 27, 2024
1 parent 3922dc7 commit 516d14d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .ci/bin/version-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
raw_version="$(cat klippy/.version)"
declare -a versontags
IFS="-" read -r -a versiontags <<<"$raw_version"
# TODO: Handle a single tag, for actual release tags
py_version="${versiontags[0]}-dev${versiontags[1]}+git.${versiontags[2]}"
echo "$py_version" > ".py_version"
2 changes: 1 addition & 1 deletion .github/workflows/pyproject-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Prepare to build
run: |
./version-setup.sh
.ci/bin/version-setup.sh
- name: Build sdist
run: |
python -m build --sdist
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.pyversion

0 comments on commit 516d14d

Please sign in to comment.