summary refs log tree commit diff
path: root/.ci/linux/create-packages.sh
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-01-10 16:00:20 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-01-10 16:00:20 +0200
commit7f3b6c4846f16a1926e49e3bfde5f267779ee1a2 (patch)
treeec5503a6e631714489aba0c5f1a7b18aed92cf45 /.ci/linux/create-packages.sh
parentAdd support for pasting images into a room (#180) (diff)
downloadnheko-7f3b6c4846f16a1926e49e3bfde5f267779ee1a2.tar.xz
Fix versioning on deb packages
fixes #197
Diffstat (limited to '.ci/linux/create-packages.sh')
-rwxr-xr-x.ci/linux/create-packages.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/.ci/linux/create-packages.sh b/.ci/linux/create-packages.sh
index bd644fce..18e57769 100755
--- a/.ci/linux/create-packages.sh
+++ b/.ci/linux/create-packages.sh
@@ -7,6 +7,17 @@
 DIR=package.dir
 TAG=`git tag -l --points-at HEAD`
 
+# Strip `v` from the version tag.
+if [[ $TAG == v* ]]; then
+    TAG=${TAG#?};
+fi
+
+# Prepend nightly with the latest version.
+if [[ $TAG == "nightly" ]]; then
+    LATEST_VERSION=`git tag -l | grep "^v" | sort | head -n 1`
+    TAG=${LATEST_VERSION#?}.nightly
+fi
+
 # Installing dependencies on travis.
 if [ ! -z "$TRAVIS_OS_NAME" ]; then
     sudo apt-add-repository -y ppa:brightbox/ruby-ng