Skip to content

Instantly share code, notes, and snippets.

@dsabanin

dsabanin/deploy.sh

Last active Aug 29, 2015
Embed
What would you like to do?
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