Last active
January 2, 2017 15:48
-
-
Save tomat/7ce538ca9e338a71c9de544228ccbf29 to your computer and use it in GitHub Desktop.
https://medium.com/@tomat/dynamic-git-branch-subdomains-with-laravel-envoyer-and-apache-f963691e1dc5
This file contains hidden or 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
| cd {{project}} | |
| # Remove dots from branch name (one may want to do more cleaning here) | |
| branch=$(echo "{{branch}}"|sed "s/\.//g") | |
| if [ "$branch" != "master" ]; then | |
| # Cleanup symlinks that may be left over from previous deploy | |
| rm -f current_archived | |
| # Save the current symlink so we can restore it later | |
| cp -P current current_archived | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment