Skip to content

Commit

Permalink
fix: edit version for devel builds (#323)
Browse files Browse the repository at this point in the history
* fix: edit version for devel builds

On development builds, use a PEP-440 compatible version, since maturin>1
requires stricter version checking.

* chore: update maturin in dev reqs

* Update ci/scripts/bump-and-tag.bash

Co-authored-by: Mahmoud Mazouz <[email protected]>

---------

Co-authored-by: Mahmoud Mazouz <[email protected]>
  • Loading branch information
diogomatsubara and fuzzypixelz authored Sep 17, 2024
1 parent 6c14925 commit 2b71197
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ci/scripts/bump-and-tag.bash
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export GIT_AUTHOR_EMAIL=$git_user_email
export GIT_COMMITTER_NAME=$git_user_name
export GIT_COMMITTER_EMAIL=$git_user_email

# For development releases (e.g. 1.0.0-dev-21-g2ca8632), transform the version
# into a PEP-440 compatible version, since maturin>1 requires strict version compliance.
if [[ "${version}" =~ [0-9]+\.[0-9]+\.[0-9]+-dev-[0-9]+-g[a-f0-9]+ ]]; then
version=$(echo $version | sed 's/dev-/dev+/')

# Bump Cargo version
toml_set_in_place Cargo.toml "package.version" "$version"
# Propagate version change to pyproject.toml
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
maturin>=0.13,<0.15
maturin>1

0 comments on commit 2b71197

Please sign in to comment.