Created
July 17, 2015 15:18
-
-
Save webkonstantin/80c3323247c30ab4093f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@servers([ 'web' => '[email protected]', 'localhost' => 'localhost' ]) | |
@macro('deploy') | |
deploy:merge | |
deploy:assets | |
deploy:push | |
deploy:pull | |
@endmacro | |
@task('deploy:merge', ['on' => 'localhost']) | |
cd /Users/sw_double/sites/octopod/tutjdut/web | |
pwd | |
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | |
echo Merging \'$CURRENT_BRANCH\' to \'deploy\' branch | |
git checkout deploy | |
git merge --no-edit $CURRENT_BRANCH | |
git checkout $CURRENT_BRANCH | |
@endtask | |
@task('deploy:assets', ['on' => 'localhost']) | |
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | |
echo Merging \'$CURRENT_BRANCH\' to \'deploy\' branch | |
git checkout deploy | |
./build.sh | |
git add -u . | |
git commit -m 'Add built assets' | |
git checkout $CURRENT_BRANCH | |
@endtask | |
@task('deploy:push', ['on' => 'localhost']) | |
git push -f -u deploy deploy | |
@endtask | |
@task('deploy:pull', ['on' => 'web']) | |
cd /root/auth-legacy.tutjdut.ru | |
pwd | |
git fetch | |
git checkout -f deploy | |
git reset --hard origin/deploy | |
docker exec tutjdut.web bash -c "cd /var/www && ./composer update" | |
@endtask |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment