File: release

package info (click to toggle)
growlight 1.2.40-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,436 kB
  • sloc: ansic: 17,172; cpp: 111; sh: 49; makefile: 6
file content (46 lines) | stat: -rwxr-xr-x 1,218 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh

set -e

usage() { echo "usage: `basename $0` oldversion newversion" ; }

[ $# -eq 2 ] || { usage >&2 ; exit 1 ; }

OLDVERSION="$1"
VERSION="$2"

git clean -f -d -x

# bump version numbers wherever they occur (wherever we enumerate them, anyway)
sed -i -e "s/\(project(growlight VERSION \)$OLDVERSION/\1$VERSION/" CMakeLists.txt
for i in doc/man/man*/*.md ; do
  sed -i -e "s/% v$OLDVERSION/% v$VERSION/" "$i"
done

BUILDDIR="build-$VERSION"
mkdir "$BUILDDIR"
cd "$BUILDDIR"
cmake ..
make -j

# 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
TARBALL=v$VERSION.tar.gz
wget https://github.com/dankamongmen/growlight/archive/$TARBALL
gpg --sign --armor --detach-sign $TARBALL
rm v$VERSION.tar.gz

echo "Cut $VERSION, signed to $TARBALL.asc"
echo "Now uploadling the sig to https://github.com/dankamongmen/growlight/releases"
echo "The bastards are trying to immanentize the Eschaton"

# requires token in ~/.netrc
tar czvf growlight-doc-$VERSION.tar.gz *.8
gh release create v$VERSION --title "$VERSION" $TARBALL.asc "growlight-doc-$VERSION.tar.gz"
rm $TARBALL.asc "growlight-doc-$VERSION.tar.gz"
cd -