Updating package.sh

This should correct the tarball structure from `riot-$version` to `element-$version`.
This commit is contained in:
thomcatdotrocks 2020-07-31 15:59:13 -05:00 committed by GitHub
parent 7e3527ff9c
commit 02ca5011a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,20 +16,20 @@ yarn build
cp config.sample.json webapp/ cp config.sample.json webapp/
mkdir -p dist mkdir -p dist
cp -r webapp riot-$version cp -r webapp element-$version
# Just in case you have a local config, remove it before packaging # Just in case you have a local config, remove it before packaging
rm riot-$version/config.json || true rm element-$version/config.json || true
# if $version looks like semver with leading v, strip it before writing to file # if $version looks like semver with leading v, strip it before writing to file
if [[ ${version} =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then if [[ ${version} =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then
echo ${version:1} > riot-$version/version echo ${version:1} > element-$version/version
else else
echo ${version} > riot-$version/version echo ${version} > element-$version/version
fi fi
tar chvzf dist/riot-$version.tar.gz riot-$version tar chvzf dist/element-$version.tar.gz element-$version
rm -r riot-$version rm -r element-$version
echo echo
echo "Packaged dist/riot-$version.tar.gz" echo "Packaged dist/element-$version.tar.gz"