1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/bin/sh
set -e
usage() { echo "usage: `basename $0` oldversion version" ; }
[ $# -eq 2 ] || { usage >&2 ; exit 1 ; }
OLDVERSION="$1"
VERSION="$2"
git clean -f -d -x
MESON=meson.build
grep $OLDVERSION "$MESON" > /dev/null || { echo "Couldn't find OLDVERSION ($OLDVERSION) in $MESON" >&2 ; exit 1 ; }
sed -i -e "s/$OLDVERSION/$VERSION/" $MESON
git commit -a -m v$VERSION
git push
git pull
git tag -a v$VERSION -m$VERSION -s
git push origin --tags
git pull
TARBALL=v$VERSION.tar.gz
wget https://github.com/libsixel/libsixel/archive/$TARBALL
gpg --sign --armor --detach-sign $TARBALL
rm $TARBALL
echo "Cut $VERSION, signed to $TARBALL.asc"
# requires token in ~/.netrc
github-release libsixel/libsixel create v$VERSION \
--name "libsixel v$VERSION" --publish $TARBALL.asc
rm $TARBALL.asc
|