forked from element-hq/element-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'deploy-auto' of github.com:livegen/riot-web into deploy…
…-auto
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |