Skip to content

Commit

Permalink
Tagged versions will override version.txt (#881)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Haziza <[email protected]>
  • Loading branch information
danthe3rd and danthe3rd authored Oct 13, 2023
1 parent ff07f60 commit ced8681
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
git config --global --add safe.directory "*"
$PY -m pip install packaging
version=`$PY packaging/compute_wheel_version.py`
echo $version > version.txt
echo "BUILD_VERSION=$version" >> ${GITHUB_ENV}
cat ${GITHUB_ENV}
- name: Build & store/upload
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wheels_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ jobs:
git config --global --add safe.directory "*"
$PY -m pip install packaging
version=`$PY packaging/compute_wheel_version.py`
echo $version > version.txt
echo "BUILD_VERSION=$version${{ steps.cuda_info.outputs.CUDA_VERSION_SUFFIX }}" >> ${GITHUB_ENV}
echo "BUILD_VERSION=$version${{ steps.cuda_info.outputs.CUDA_VERSION_SUFFIX }}" >> ${GITHUB_OUTPUT}
cat ${GITHUB_ENV}
Expand Down
6 changes: 0 additions & 6 deletions packaging/compute_wheel_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ def get_tagged_version() -> Optional[str]:

if not tag.startswith("v"):
return None

# Should match the version in `version.txt`
# (except for the suffix like `rc` tag)
assert (
version.parse(version_from_file).release == version.parse(tag[1:]).release
), f"The version in version.txt ({version_from_file}) does not match the given tag ({tag})"
return tag[1:]


Expand Down

0 comments on commit ced8681

Please sign in to comment.