Skip to content

Instantly share code, notes, and snippets.

@dsabanin
Last active August 29, 2015 14:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsabanin/ce55ac94b68a287be364 to your computer and use it in GitHub Desktop.
Save dsabanin/ce55ac94b68a287be364 to your computer and use it in GitHub Desktop.
Tiny capistrano-like script for dploy.io
# Execute as ./deploy.sh /data/project 19851203123502
# It will deploy final release as a symlink from /data/project/current to /data/project/releases/19851203123502
BASE=$1
TIMESTAMP=$2
RELEASE=$BASE/releases/$TIMESTAMP
mkdir -p $BASE/releases $BASE/shared $BASE/logs
cp -al $BASE/deploy-cache $RELEASE
ln -fs $BASE/logs $RELEASE/
# ln -fs $BASE/shared/config.ini $BASE/releases/$TIMESTAMP/config.ini
# cd $RELEASE; optional build step here
rm -f $BASE/current
ln -s $RELEASE $BASE/current
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment