2018-02-19 20:34:16 +00:00
|
|
|
#!/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
|
|
|
|
|
2018-02-20 13:14:23 +00:00
|
|
|
while [ -f $TRIGGER ]; do
|
|
|
|
sleep 1;
|
|
|
|
done;
|
|
|
|
|
|
|
|
|
2018-02-19 20:34:16 +00:00
|
|
|
# 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
|
2018-02-20 13:15:42 +00:00
|
|
|
docker exec php-fpm bash -c "cd /vhost; composer install";
|
2018-02-20 12:33:00 +00:00
|
|
|
|
|
|
|
# 4. Re-build js/scss
|
2018-02-20 13:03:56 +00:00
|
|
|
docker exec php-fpm bash -c "cd /vhost; npm install; npm run build";
|
2018-02-20 12:16:30 +00:00
|
|
|
|
2018-02-19 20:34:16 +00:00
|
|
|
# ...
|
|
|
|
|
|
|
|
# N. Recreate trigger
|
|
|
|
test ! -f $TRIGGER && touch $TRIGGER;
|
|
|
|
|
|
|
|
done;
|