This commit is contained in:
Martin Donnelly 2016-09-29 10:14:29 +01:00
parent 2d0825fa85
commit 8e3d35a4e1

View File

@ -1,13 +1,13 @@
#!/bin/bash
GIT_FRONTEND="https://censis.visualstudio.com/DefaultCollection/SmartOffice/_git/mDotServer"
GIT_BACKEND="http://gitlab.silvrtree.co.uk/martind2000/mqttArchiver.git"
GIT_SERVER="http://gitlab.silvrtree.co.uk/martind2000/mqttArchiver.git"
NVM="$HOME/.nvm"
NVM_VERSION="6.6.0"
DEV="$HOME/dev"
LIVE="$HOME/live"
STAGING="$HOME/staging"
SERVER="mqttArchiver"
FRONT="mdot_server"
FRONT="mDotServer"
SWAP="/swapfile"
NGINXFILE='mdot';
PKG_MANAGER=$( command -v yum || command -v apt-get ) || echo "Neither yum nor apt-get found"
@ -185,7 +185,7 @@ if [[ $UPDATE = "YES" ]]; then
# Rebuild front end
cd $DEV/$FRONT
rsync -uav --exclude .git $DEV/$FRONT/ $STAGING/$FRONT
rsync -uav -P --exclude .git $DEV/$FRONT/ $STAGING/$FRONT
cd $STAGING/$FRONT
npm install . && npm-install-missing
@ -194,16 +194,16 @@ if [[ $UPDATE = "YES" ]]; then
# Rebuild backend end
cd $DEV/$SERVER
rsync -uav --exclude .git $DEV/$FRONT/ $STAGING/$FRONT
cd $STAGING/$FRONT
rsync -uav -P --exclude .git $DEV/$SERVER/ $STAGING/$SERVER
cd $STAGING/$SERVER
npm install . && npm-install-missing
bower install
# Update live versions
fancy_echo "${YELLOW}Copying files to LIVE...${RESET}"
rsync -uav --exclude .git $STAGING/$SERVER/ $LIVE/$STAGING
rsync -uav --exclude .git --exclude app $STAGING/$FRONT/ $LIVE/$FRONT
rsync -uav --delete-delay -P --exclude .git $STAGING/$SERVER/ $LIVE/$STAGING
rsync -uav --delete-delay -P --exclude .git --exclude app $STAGING/$FRONT/ $LIVE/$FRONT
fi