summaryrefslogtreecommitdiffstats
path: root/fb-client-up
blob: 1bbf2737e8d306b53563d4a65968e65cb3a6f1cc (plain)
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
#!/bin/bash

set -e

branch="${1:-master}"

TMPDIR="`mktemp -d "/tmp/fb-client-up.XXXXXX"`"
trap "rm -rf '${TMPDIR}'" EXIT TERM

cd "$TMPDIR"
git clone ~/git/fb .
git checkout "$branch"

VERSION="$(make version)"

git tag --verify "v$VERSION"

echo "==> Building release tarball"
make dist
echo "==> Building finished"

gpg --detach-sign "dist/fb-$VERSION.tar.gz"
scp "dist/fb-$VERSION.tar.gz" dist/fb-$VERSION.tar.gz.sig web-filebin@karif:public_html/data/client

if [[ $branch = "master" ]]; then
	ssh web-filebin@karif echo "$VERSION" \> public_html/data/client/latest
fi

echo "released version: $VERSION"