diff --git a/.ci/bin/version-setup.sh b/.ci/bin/version-setup.sh new file mode 100755 index 0000000..5f479a8 --- /dev/null +++ b/.ci/bin/version-setup.sh @@ -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" diff --git a/.github/workflows/pyproject-build.yml b/.github/workflows/pyproject-build.yml index f83ceed..efc19f1 100644 --- a/.github/workflows/pyproject-build.yml +++ b/.github/workflows/pyproject-build.yml @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..94387c6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.pyversion