Skip to content

Instantly share code, notes, and snippets.

@psaia
Created August 28, 2017 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psaia/afe19d03fceb76b80541c357a9b54792 to your computer and use it in GitHub Desktop.
Save psaia/afe19d03fceb76b80541c357a9b54792 to your computer and use it in GitHub Desktop.
f=$(date +%Y-%m-%d-%H-%M-%S)
dest=$(realpath $(pwd)/..)
# Archive newly deployed files in the releases directory.
cp -R $dest/.tmp/ $dest/releases/$n
# Update the symlink to point to the latest release (atomic).
ln -sfn $dest/releases/$n $dest/live-app
# Clean up.
rm -rf $dest/.tmp/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment