Skip to content

Commit

Permalink
Merge branch 'deploy-auto' of github.com:livegen/riot-web into deploy…
Browse files Browse the repository at this point in the history
…-auto
  • Loading branch information
coolmic committed Sep 16, 2021
2 parents fa61e51 + 608bd7b commit 98508af
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions scripts/deploy-auto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -e

if [ -n "$DIST_VERSION" ]; then
version=$DIST_VERSION
else
version=`git describe --dirty --tags || echo unknown`
fi

yarn clean
yarn build

# include the sample config in the tarball. Arguably this should be done by
# `yarn build`, but it's just too painful.
cp config.json webapp/
cp config.json webapp/config.livegen.net.json

mkdir -p webapp/.well-known/matrix
echo '{"m.server":"hs.livegen.net"}' > webapp/.well-known/matrix/server

# if $version looks like semver with leading v, strip it before writing to file
if [[ ${version} =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then
echo ${version:1} > webapp/version
else
echo ${version} > webapp/version
fi

0 comments on commit 98508af

Please sign in to comment.