summary refs log tree commit diff
path: root/.ci
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-30 18:32:16 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-30 18:32:16 +0200
commit287dff892ce8ba269c65cc0e74c115c93d96297e (patch)
tree04e671702a22dee0695b5a7ba177c5ddb81e1ba7 /.ci
parentLoad last content from all rooms (diff)
downloadnheko-287dff892ce8ba269c65cc0e74c115c93d96297e.tar.xz
ci: Don't build artifacts on commits without a tag
Diffstat (limited to '.ci')
-rwxr-xr-x.ci/linux/create-packages.sh10
-rwxr-xr-x.ci/linux/deploy.sh5
-rwxr-xr-x.ci/macos/deploy.sh6
3 files changed, 18 insertions, 3 deletions
diff --git a/.ci/linux/create-packages.sh b/.ci/linux/create-packages.sh
index c814882b..e18c2e6f 100755
--- a/.ci/linux/create-packages.sh
+++ b/.ci/linux/create-packages.sh
@@ -5,7 +5,11 @@
 #
 
 DIR=package.dir
-VERSION=`git tag -l --points-at HEAD`
+TAG=`git tag -l --points-at HEAD`
+
+if [ -z "$TAG" ]; then
+    exit 0
+fi
 
 # Installing dependencies on travis.
 if [ ! -z "$TRAVIS_OS_NAME" ]; then
@@ -38,7 +42,7 @@ fpm --force \
     --name nheko \
     --description "Desktop client for the Matrix protocol" \
     --url "https://github.com/mujx/nheko" \
-    --version ${VERSION} \
+    --version ${TAG} \
     --architecture x86_64 \
     --maintainer "mujx (https://github.com/mujx)" \
     --license "GPLv3" \
@@ -46,4 +50,4 @@ fpm --force \
     --deb-no-default-config-files \
     --chdir ${DIR} usr
 
-fpm -s deb -t rpm nheko_${VERSION}_amd64.deb
+fpm -s deb -t rpm nheko_${TAG}_amd64.deb
diff --git a/.ci/linux/deploy.sh b/.ci/linux/deploy.sh
index 42f06628..0e85bbdb 100755
--- a/.ci/linux/deploy.sh
+++ b/.ci/linux/deploy.sh
@@ -4,6 +4,11 @@ set -e
 
 APP=nheko
 DIR=${APP}.AppDir
+TAG=`git tag -l --points-at HEAD`
+
+if [ -z "$TAG" ]; then
+    exit 0
+fi
 
 # Set up AppImage structure.
 mkdir -p ${DIR}/usr/{bin,share/pixmaps,share/applications}
diff --git a/.ci/macos/deploy.sh b/.ci/macos/deploy.sh
index 76346d47..7d28b81e 100755
--- a/.ci/macos/deploy.sh
+++ b/.ci/macos/deploy.sh
@@ -2,6 +2,12 @@
 
 set -e
 
+TAG=`git tag -l --points-at HEAD`
+
+if [ -z "$TAG" ]; then
+    exit 0
+fi
+
 # Add Qt binaries to path
 PATH=/usr/local/opt/qt/bin/:${PATH}