fix(ci): move pyproject.toml update to script file

This commit is contained in:
2024-12-25 11:25:24 +00:00
parent 3293ac0d53
commit f31c59da5b
2 changed files with 10 additions and 7 deletions

9
tools/update_pyproject.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
OLD_VERSION=$(grep ^version pyproject.toml | cut -d '"' -f 2)
echo "OLD_VERSION: $OLD_VERSION"
OLD_VERSION="\"$OLD_VERSION\""
NEW_VERSION=$(echo "$1" | cut -d '"' -f 2 | cut -d 'v' -f 2)
echo "NEW_VERSION: $NEW_VERSION"
NEW_VERSION="\"$NEW_VERSION\""
sed -i "s+version = $OLD_VERSION+version = $NEW_VERSION+g" pyproject.toml