ptut-virtenv/metactl/ci/web.sh

40 lines
793 B
Bash
Raw Normal View History

#!/bin/bash
TMP="$(dirname `realpath $0`)";
TMP="`dirname $TMP`";
source $TMP/environment.sh;
#################################################
## ##
## Executed on 'env' Coninuous Integration ##
## ##
#################################################
TRIGGER="`realpath $ROOT/../../virtual/ci/web`";
while true; do
# 1. Go to root directory
cd $ROOT/../..;
# 2. Update submodule 'vhost'
git submodule update --remote;
2018-02-20 12:33:00 +00:00
# 3. Update composer
docker exec php-fpm composer update -d /vhost;
2018-02-20 12:33:00 +00:00
# 4. Re-build js/scss
docker exec php-fpm npm run build --prefix /vhost;
# ...
# N. Recreate trigger
test ! -f $TRIGGER && touch $TRIGGER;
while [ -f $TRIGGER ]; do
sleep 1;
done;
done;