forked from alexheretic/apart-gtk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release
executable file
·37 lines (28 loc) · 951 Bytes
/
release
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
#!/usr/bin/env bash
set -eu
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
rm -rf $dir/last-release
mkdir $dir/last-release
cd $dir/last-release
tagname=$(../src/app.py -v | cut -d ' ' -f 2) # requires app.py to be runnable, ie dev dependencies
if git rev-parse $tagname >/dev/null 2>&1
then
echo "tag $tagname already exists" >&2
exit 1
fi
echo "Release $tagname"
read -p "continue? [y/N] " -n 1 -r
echo
if ! [[ $REPLY =~ ^[^Nn]$ ]]; then
exit 0
fi
git tag -s $tagname -m "Release $tagname"
git push --tags
curl -OL "https://github.com/alexheretic/apart-gtk/archive/$tagname.tar.gz"
# gpg --armor --detach-sign "$tagname.tar.gz"
sha256sum *tar.gz*
SHA256=$(sha256sum *tar.gz | cut -d ' ' -f 1)
echo "Pushed tag $tagname to repo, ready to add notes"
echo "build deb with: misc/docker-build-packages --version=${tagname#?} --sha256=$SHA256"
gio open "https://github.com/alexheretic/apart-gtk/releases/new?tag=$tagname"
cd $dir