From 61c338a23358f340008f63a2b193d18e59529b87 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 2 May 2017 21:24:02 +0100 Subject: [PATCH] remove leading v in /version file so its semver and also then consistent with electron versioning Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- scripts/package.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/package.sh b/scripts/package.sh index 5c1fdd5e36..b3bc00bf03 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e @@ -22,7 +22,14 @@ cp config.sample.json webapp/ mkdir -p dist cp -r webapp vector-$version -echo $version > vector-$version/version + +# if $version looks like semver with leading v, strip it before writing to file +if [[ ${version} =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then + echo ${version:1} > vector-$version/version +else + echo ${version} > vector-$version/version +fi + tar chvzf dist/vector-$version.tar.gz vector-$version rm -r vector-$version