2020-04-19 06:23:08 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-11-22 04:43:41 +00:00
|
|
|
# requires https://pypi.org/project/githubrelease/
|
|
|
|
|
2020-04-19 06:23:08 +00:00
|
|
|
set -e
|
|
|
|
|
2020-07-27 01:21:06 +00:00
|
|
|
usage() { echo "usage: `basename $0` oldversion newversion quip" ; }
|
2020-04-19 06:23:08 +00:00
|
|
|
|
2020-07-27 01:21:06 +00:00
|
|
|
[ $# -eq 3 ] || { usage >&2 ; exit 1 ; }
|
2020-04-19 06:23:08 +00:00
|
|
|
|
|
|
|
OLDVERSION="$1"
|
|
|
|
VERSION="$2"
|
2020-07-27 01:21:06 +00:00
|
|
|
QUIP="$3"
|
2020-04-19 06:23:08 +00:00
|
|
|
|
2020-05-11 01:38:46 +00:00
|
|
|
vi NEWS.md
|
2020-04-19 06:23:08 +00:00
|
|
|
|
2020-05-07 05:37:52 +00:00
|
|
|
git clean -f -d -x
|
2020-07-27 01:21:06 +00:00
|
|
|
|
2021-02-08 23:28:29 +00:00
|
|
|
# Doing general context-free regexery has led several times to heartache. We
|
|
|
|
# thus do tightly-coupled, context-sensitive seds for each class of files.
|
|
|
|
# Please don't add version numbers where they're not necessary.
|
|
|
|
# FIXME we ought probably verify that there has been an actual change, as these
|
|
|
|
# will surely otherwise go out of date.
|
|
|
|
sed -i -e "s/\(project(notcurses VERSION \)$OLDVERSION/\1$VERSION/" CMakeLists.txt
|
|
|
|
sed -i -e "s/\(PROJECT_NUMBER *= \)$OLDVERSION/\1$VERSION/" doc/Doxyfile
|
|
|
|
for i in doc/man/man*/*.md cffi/notcurses-*.md ; do
|
|
|
|
sed -i -e "s/% v$OLDVERSION/% v$VERSION/" "$i"
|
2020-04-19 06:23:08 +00:00
|
|
|
done
|
2021-02-08 23:28:29 +00:00
|
|
|
sed -i -e "s/(v$OLDVERSION)/(v$VERSION)/" doc/man/index.html
|
2021-02-08 23:32:14 +00:00
|
|
|
sed -i -e "s/version=\"$OLDVERSION\"/version=\"$VERSION\"/" cffi/setup.py
|
|
|
|
sed -i -e "s/^version = \"$OLDVERSION\"$/version = \"$VERSION\"/" rust/Cargo.toml
|
|
|
|
sed -i -e "s/atleast_version(\"$OLDVERSION\")/atleast_version(\"$VERSION\")/" rust/build/build.rs
|
2020-07-27 01:21:06 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
BUILDDIR="build-$VERSION"
|
|
|
|
|
2020-07-27 01:21:06 +00:00
|
|
|
# do a build with Doxygen enabled, upload docs, clean it up
|
2020-08-23 17:04:10 +00:00
|
|
|
mkdir "$BUILDDIR"
|
|
|
|
cd "$BUILDDIR"
|
2020-07-27 01:21:06 +00:00
|
|
|
cmake -DUSE_DOXYGEN=on ..
|
|
|
|
make -j
|
|
|
|
make test
|
2020-08-25 22:23:13 +00:00
|
|
|
ssh qemfd.net rm -rf /opt/notcurses/html
|
|
|
|
scp -r html qemfd.net:/opt/notcurses/html
|
2020-11-28 23:56:39 +00:00
|
|
|
scp *.html ../doc/man/index.html model.png qemfd.net:/opt/notcurses/
|
2020-07-27 01:21:06 +00:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
# if that all worked, commit, push, and tag
|
2020-04-19 06:23:08 +00:00
|
|
|
git commit -a -m v$VERSION
|
|
|
|
git push
|
|
|
|
git pull
|
2020-05-17 12:12:26 +00:00
|
|
|
git tag -a v$VERSION -m v$VERSION -s
|
2020-04-19 06:23:08 +00:00
|
|
|
git push origin --tags
|
|
|
|
git pull
|
2020-07-27 01:21:06 +00:00
|
|
|
TARBALL=v$VERSION.tar.gz
|
|
|
|
wget https://github.com/dankamongmen/notcurses/archive/$TARBALL
|
|
|
|
gpg --sign --armor --detach-sign $TARBALL
|
2020-05-07 05:51:25 +00:00
|
|
|
rm v$VERSION.tar.gz
|
2020-04-19 06:23:08 +00:00
|
|
|
|
2020-07-27 01:21:06 +00:00
|
|
|
echo "Cut $VERSION, signed to $TARBALL.asc"
|
2020-08-24 02:35:28 +00:00
|
|
|
echo "Now uploadling the sig to https://github.com/dankamongmen/notcurses/releases"
|
2020-05-07 05:51:25 +00:00
|
|
|
echo "The bastards are trying to immanentize the Eschaton"
|
2020-07-27 01:21:06 +00:00
|
|
|
|
|
|
|
# requires token in ~/.netrc
|
2020-07-27 01:32:24 +00:00
|
|
|
github-release dankamongmen/notcurses create v$VERSION --name "v$VERSION—$QUIP" --publish $TARBALL.asc
|
2020-08-24 02:35:28 +00:00
|
|
|
rm $TARBALL.asc
|
2020-07-27 01:21:06 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
cd "$BUILDDIR"
|
2020-08-23 11:45:28 +00:00
|
|
|
sudo make install
|
2021-03-14 20:58:44 +00:00
|
|
|
# restrict to files beginning with n* to leave out shared objects
|
|
|
|
tar czvf notcurses-doc-$VERSION.tar.gz n*.1 n*.3 *.html
|
2020-10-08 21:44:54 +00:00
|
|
|
github-asset dankamongmen/notcurses upload v$VERSION notcurses-doc-$VERSION.tar.gz
|
2020-11-22 06:47:09 +00:00
|
|
|
cd ../cffi
|
2020-08-03 06:52:27 +00:00
|
|
|
python3 setup.py sdist
|
2020-08-23 11:45:28 +00:00
|
|
|
python3 setup.py build
|
2020-08-03 06:52:27 +00:00
|
|
|
twine upload -s -udankamongmen dist/*
|
2020-08-16 12:55:38 +00:00
|
|
|
cd ../rust
|
2020-07-27 01:21:06 +00:00
|
|
|
cargo clean
|
|
|
|
cargo publish
|
2020-12-09 16:10:45 +00:00
|
|
|
|
|
|
|
cd ../tools/
|
|
|
|
./rustdoc-update-gh-pages.sh
|
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
cd "../$BUILDDIR"
|
2020-08-23 11:45:28 +00:00
|
|
|
cat install_manifest.txt | sudo xargs rm
|