summaryrefslogtreecommitdiffhomepage
path: root/make-tar.sh
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-01-06 20:24:11 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-01-06 20:29:11 +0100
commit1baa26f8c13462ebc424605420d8e60a1977e3a8 (patch)
tree808fd5a3cad864ce11dcdad87db3f5177413c457 /make-tar.sh
parentde5654e7a832554ade452e18dce65326b7025b17 (diff)
cmake: don't upload tarball for branch builds
Diffstat (limited to 'make-tar.sh')
-rw-r--r--make-tar.sh28
1 files changed, 17 insertions, 11 deletions
diff --git a/make-tar.sh b/make-tar.sh
index 08114127..abb83fdd 100644
--- a/make-tar.sh
+++ b/make-tar.sh
@@ -4,22 +4,28 @@ prefix="$1"
filename="$2"
bin="$3"
+branch="$(git rev-parse --abbrev-ref HEAD)"
+
cmake --build "$bin" --target install -- -j4 || exit 1
-if : &&
+if : &&
cd $(dirname -- "${prefix}") &&
zip -9r "${filename}" $(basename "${prefix}")
then
- case "$USER,$(uname -s)" in
- # for the script see https://github.com/andreafabrizi/Dropbox-Uploader
- sthalik,CYGWIN_*)
- dropbox_uploader.sh -p upload "$filename" /
- bn="$(basename -- "$filename")"
- l="$(dropbox_uploader.sh -q share /"$bn")"
- test -n "$l" && echo -n "$l" | putclip
- echo $l
- echo -ne '\a' ;;
- *) ls -lh -- "${filename}" ;;
+ case "$branch" in
+ unstable)
+ case "$USER,$(uname -s)" in
+ # for the script see https://github.com/andreafabrizi/Dropbox-Uploader
+ sthalik,CYGWIN_*)
+ dropbox_uploader.sh -p upload "$filename" /
+ bn="$(basename -- "$filename")"
+ l="$(dropbox_uploader.sh -q share /"$bn")"
+ test -n "$l" && echo -n "$l" | putclip
+ echo $l
+ echo -ne '\a' ;;
+ *) ls -lh -- "${filename}" ;;
+ esac ;;
+ *) ;;
esac
else
rm -fv -- "${filename}"