Simplicity is at the heart of everything I do. If you are a developer, you know how complex the average deployment system is. Mine looks like this:
> ./deploy.sh
Deploying...
Done.
#!/bin/sh
TARGET_HOST="simon@simonernst.com"
TARGET_DIR="/var/www/simonernst"
echo Deploying...
git archive -o bundle.tgz HEAD &&
scp -q bundle.tgz $TARGET_HOST:/tmp/ &&
rm bundle.tgz &&
ssh $TARGET_HOST 'bash -s' <<ENDSSH
mkdir -p $TARGET_DIR && rm -rf $TARGET_DIR/*
tar xfzo /tmp/bundle.tgz -C $TARGET_DIR
rm /tmp/bundle.tgz
ENDSSH
echo Done.
Modern operating systems come with a variety of tools and scripting languages pre-installed. There is no need for expensive and resource hungry third party software. It’s just a matter of combining what is already there.