1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Update script/release to do clean room dist builds

This commit is contained in:
Ross McFarland
2023-09-29 12:53:35 -07:00
parent 0567af7df8
commit 3953f1dea5

View File

@@ -37,7 +37,16 @@ VERSION="$(grep "^__VERSION__" "$ROOT/octodns/__init__.py" | sed -e "s/.* = '//"
git tag -s "v$VERSION" -m "Release $VERSION"
git push origin "v$VERSION"
echo "Tagged and pushed v$VERSION"
python -m build --sdist --wheel
TMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX)
git archive --format tar v1.2.0 | tar xv -C $TMP_DIR
echo "Created clean room $TMP_DIR and archived $VERSION into it"
(cd "$TMP_DIR" && python -m build --sdist --wheel)
cp $TMP_DIR/dist/*$VERSION.tar.gz $TMP_DIR/dist/*$VERSION*.whl dist/
echo "Copied $TMP_DIR/dists into ./dist"
twine check dist/*$VERSION.tar.gz dist/*$VERSION*.whl
twine upload dist/*$VERSION.tar.gz dist/*$VERSION*.whl
echo "Uploaded $VERSION"