apply config file when starting riot, not installing, so we can support riots that were built by another process
This commit is contained in:
parent
31fcf08fec
commit
e50420dd1b
3 changed files with 18 additions and 2 deletions
|
@ -12,7 +12,6 @@ curl -L https://github.com/vector-im/riot-web/archive/${RIOT_BRANCH}.zip --outpu
|
||||||
unzip riot.zip
|
unzip riot.zip
|
||||||
rm riot.zip
|
rm riot.zip
|
||||||
mv riot-web-${RIOT_BRANCH} riot-web
|
mv riot-web-${RIOT_BRANCH} riot-web
|
||||||
cp config-template/config.json riot-web/
|
|
||||||
cd riot-web
|
cd riot-web
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
|
|
|
@ -12,6 +12,13 @@ fi
|
||||||
|
|
||||||
echo "running riot on http://localhost:$PORT ..."
|
echo "running riot on http://localhost:$PORT ..."
|
||||||
pushd riot-web/webapp/ > /dev/null
|
pushd riot-web/webapp/ > /dev/null
|
||||||
|
|
||||||
|
# backup config file before we copy template
|
||||||
|
if [ -f config.json ]; then
|
||||||
|
mv config.json $CONFIG_BACKUP
|
||||||
|
fi
|
||||||
|
cp $BASE_DIR/config-template/config.json .
|
||||||
|
|
||||||
python -m SimpleHTTPServer $PORT > /dev/null 2>&1 &
|
python -m SimpleHTTPServer $PORT > /dev/null 2>&1 &
|
||||||
PID=$!
|
PID=$!
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
12
riot/stop.sh
12
riot/stop.sh
|
@ -1,9 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
BASE_DIR=$(readlink -f $(dirname $0))
|
BASE_DIR=$(readlink -f $(dirname $0))
|
||||||
cd $BASE_DIR
|
|
||||||
PIDFILE=riot.pid
|
PIDFILE=riot.pid
|
||||||
|
CONFIG_BACKUP=config.e2etests_backup.json
|
||||||
|
|
||||||
|
cd $BASE_DIR
|
||||||
|
|
||||||
if [ -f $PIDFILE ]; then
|
if [ -f $PIDFILE ]; then
|
||||||
echo "stopping riot server ..."
|
echo "stopping riot server ..."
|
||||||
kill $(cat $PIDFILE)
|
kill $(cat $PIDFILE)
|
||||||
rm $PIDFILE
|
rm $PIDFILE
|
||||||
|
|
||||||
|
# revert config file
|
||||||
|
cd riot-web/webapp
|
||||||
|
rm config.json
|
||||||
|
if [ -f $CONFIG_BACKUP ]; then
|
||||||
|
mv $CONFIG_BACKUP config.json
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue