Skip to content

Commit

Permalink
Simplify bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetrergeru committed Sep 22, 2023
1 parent b06ec4f commit 9548253
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ jobs:
| sed 's#[^a-zA-Z0-9_\.\-]#_#g'`
echo "tag version = $VERSION_TAG"
cat << EOF | python - > __version.txt
import version
print(version.VERSION)
EOF
VERSION_FILE=$(cat __version.txt)
rm __version.txt
VERSION_FILE=$(echo 'import version; print(version.VERSION)' | python -)
echo "file version = $VERSION_FILE"
if [ "$VERSION_TAG" != "$VERSION_FILE" ]; then
echo "Version in file 'version.py' must be the same as the puched tag"
echo "Version in file 'version.py' must be the same as the pushed tag"
fi
python -m build --sdist --wheel --outdir dist/
Expand Down

0 comments on commit 9548253

Please sign in to comment.