Browse Source

Update script/release to do clean room dist builds

pull/1076/head
Ross McFarland 2 years ago
parent
commit
3953f1dea5
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      script/release

+ 10
- 1
script/release 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"

Loading…
Cancel
Save