tools/release: automate release process #826

pull/832/head
nick black 4 years ago
parent dab269f506
commit 54d0420161
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -9,23 +9,22 @@
## Release
* Run tools/release.sh $OLDVERSION $VERSION
* Run tools/release.sh $OLDVERSION $VERSION "quip"
* Cleans repo with `git clean -f -d -x`
* Opens an editor to finalize NEWS.md
* Bumps version numbers everywhere they need bumping
* Commits changes, tags result with v$VERSION, pushes tag
* Downloads new tarball and signs it
* Upload signature to github
* Draft new release at https://github.com/dankamongmen/notcurses/releases
* Title is "v$VERSION—some quip"
* That's an em dash (U+2014, UTF-8 e2 80 94), get it right
* Upload new Rust crate with `cargo publish`
* Upload new Python pip with
* `python3 setup.py sdist`
* `twine upload dist/*`
* Generate and upload new HTML documentation via `make html`
* `scp *.html ../doc/man/index.html qemfd.net:/var/www/notcurses/`
* Generate and upload new Doxygen documentation via `doxygen ../doc/Doxyfile`
* `scp -r html qemfd.net:/var/www/notcurses/`
* Uploads signature to github
* Uploads new Rust crates with `cargo publish`
* Uploads new Python pip with
* `python3 setup.py sdist`
* `twine upload dist/*`
* Generates and uploads new HTML documentation via `make html`
* `scp *.html ../doc/man/index.html qemfd.net:/var/www/notcurses/`
* `scp -r html qemfd.net:/var/www/notcurses/`
* Publishes new release at https://github.com/dankamongmen/notcurses/releases
* Title is "v$VERSION—some quip"
## Packaging

@ -2,32 +2,62 @@
set -e
usage() { echo "usage: `basename $0` oldversion newversion" ; }
usage() { echo "usage: `basename $0` oldversion newversion quip" ; }
[ $# -eq 2 ] || { usage >&2 ; exit 1 ; }
[ $# -eq 3 ] || { usage >&2 ; exit 1 ; }
OLDVERSION="$1"
VERSION="$2"
QUIP="$3"
vi NEWS.md
git clean -f -d -x
# bump version numbers wherever they occur (wherever we enumerate them, anyway)
BUMP="CMakeLists.txt doc/Doxyfile doc/man/man*/* doc/man/index.html python/setup.py rust/*/Cargo.toml rust/libnotcurses-sys/build.rs"
for i in $BUMP ; do
sed -i -e "s/$OLDVERSION/$VERSION/g" $i
done
echo "Checking for instances of $OLDVERSION..."
grep -rF "$OLDVERSION" * || true
# do a build with Doxygen enabled, upload docs, clean it up
mkdir build
cd build
cmake -DUSE_DOXYGEN=on ..
make -j
make test
scp html/* qemfd.net:/var/www/notcurses/html/
scp *.html ../doc/man/index.html qemfd.net:/var/www/notcurses/
cd ..
rm -rf build
# if that all worked, commit, push, and tag
git commit -a -m v$VERSION
git push
git pull
git tag -a v$VERSION -m v$VERSION -s
git push origin --tags
git pull
wget https://github.com/dankamongmen/notcurses/archive/v$VERSION.tar.gz
gpg --sign --armor --detach-sign v$VERSION.tar.gz
TARBALL=v$VERSION.tar.gz
wget https://github.com/dankamongmen/notcurses/archive/$TARBALL
gpg --sign --armor --detach-sign $TARBALL
rm v$VERSION.tar.gz
echo "Cut $VERSION, signed to v$VERSION.tar.gz.asc"
echo "Cut $VERSION, signed to $TARBALL.asc"
echo "Now upload the sig to https://github.com/dankamongmen/notcurses/releases"
echo "The bastards are trying to immanentize the Eschaton"
# requires token in ~/.netrc
github-release dankamongmen/notcurses create --name "v$VERSION$QUIP" --publish
github-asset dankamongmen/notcurses upload v$VERSION $TARBALL.asc
cd ../rust/libnotcurses-sys
cargo clean
cargo publish
cd ../notcurses
cargo clean
cargo publish
cd ../../python
python3 setup.py sdist
twine upload dist/*

Loading…
Cancel
Save