Created
February 24, 2018 22:29
-
-
Save keithmancuso/3f1bf475cc71a6081026487cc7e32a42 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
if [ -d "releases/${execution.to_revision.revision}" ] && [ "${execution.refresh}" = "true" ]; then echo "Removing: releases/${execution.to_revision.revision}" && rm -rf releases/${execution.to_revision.revision}; fi | |
if [ ! -d "releases/${execution.to_revision.revision}" ]; then echo "Creating: releases/${execution.to_revision.revision}" && cp -dR deploy-cache releases/${execution.to_revision.revision}; fi | |
echo "Linking current to revision: ${execution.to_revision.revision}" | |
rm -f current | |
ln -s releases/${execution.to_revision.revision} current | |
echo "Removing old releases" | |
cd releases && ls -t | tail -n +11 | xargs rm -rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment