remove leading v in /version file so its semver

and also then consistent with electron versioning

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-05-02 21:24:02 +01:00
parent 9f3c1deae6
commit 61c338a233

View File

@ -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