Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
cd /var/repos/wsu-spine
unset GIT_DIR
git checkout -- .
git checkout develop
git pull origin develop
git fetch --all
git checkout $1
export PATH="/home/www-data/.gem/ruby/1.9.1/bin:/usr/local/rvm/gems/ruby-1.9.3-p547/bin:/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p547/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rvm/bin"
echo $PATH > /var/repos/deploy/path.txt
npm install
grunt prod > /var/repos/deploy/grunt-results.txt
if [[ "develop" == $1 ]]; then
rm -fr "/var/www/"
cp -fr "/var/repos/wsu-spine/build" "/var/www/"
var=$(echo $1 | awk -F"." '{print $1,$2,$3}')
set -- $var
rm -fr "/var/www/$1"
cp -fr "/var/repos/wsu-spine/build" "/var/www/$1"
rm -fr "/var/www/$1.$2"
cp -fr "/var/repos/wsu-spine/build" "/var/www/$1.$2"
rm -fr "/var/www/$1.$2.$3"
cp -fr "/var/repos/wsu-spine/build" "/var/www/$1.$2.$3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment