Skip to content

Instantly share code, notes, and snippets.

@tomat
Last active January 2, 2017 15:48
Show Gist options
  • Select an option

  • Save tomat/7ce538ca9e338a71c9de544228ccbf29 to your computer and use it in GitHub Desktop.

Select an option

Save tomat/7ce538ca9e338a71c9de544228ccbf29 to your computer and use it in GitHub Desktop.
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