Skip to content

Commit add488f

Browse files
committed
CI: update release utility scripts
1 parent 3fa007b commit add488f

2 files changed

Lines changed: 37 additions & 2 deletions

File tree

build_dist.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
# bash strict mode
3+
set -euo pipefail
4+
IFS=$'\n\t'
5+
6+
err() {
7+
echo "$@" >&2
8+
}
9+
10+
LAST=$(git tag --sort version:refname | grep -v rc | tail -1)
11+
12+
echo "Building distribution for: $LAST"
13+
git checkout $LAST
14+
15+
# superficial check that whats_new.rst has been updated
16+
if ! grep -q "$LAST" doc/source/whats_new.rst ; then
17+
err "release notes not updated, exiting"
18+
exit -1
19+
fi
20+
21+
make cython
22+
23+
read -p "Ok to continue (y/n)? " answer
24+
case ${answer:0:1} in
25+
y|Y )
26+
echo "Building distribution"
27+
python setup.py clean
28+
python setup.py build_ext --inplace
29+
python setup.py sdist --formats=zip,gztar
30+
;;
31+
* )
32+
echo "Not building distribution"
33+
;;
34+
esac
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ do
2121
wheel_url="${RACKSPACE_URL}/${wheel_name}"
2222
curl -O $wheel_url
2323
done
24-
# upload to pypi
24+
# suggest upload to pypi
2525
cd ..
26-
twine upload --sign wheels/*.whl
26+
echo "wheels now need to be uploaded to PyPI using a command such as:"
27+
echo "twine upload --sign wheels/*.whl"

0 commit comments

Comments
 (0)