Skip to content

Instantly share code, notes, and snippets.

@nosolopau
Last active November 11, 2015 16:32
Show Gist options
  • Save nosolopau/bdfad33d414cdec0d8a5 to your computer and use it in GitHub Desktop.
Save nosolopau/bdfad33d414cdec0d8a5 to your computer and use it in GitHub Desktop.
The top-secret, ultimate, easy deployer.
#!/bin/bash
if [ -f "Capfile" ]
then
if [ "$1" = "parriba" ]
then
env='production'
else
env='staging'
fi
echo "Deploying to $env with Capistrano..."
bundle exec cap $env deploy
elif [ -f "dandelion.yml" ]
then
if [ "$1" = "parriba" ]
then
opt=''
else
opt='--dry-run'
fi
echo "Deploying with Dandelion..."
dandelion deploy $opt
else
echo "Deployer not found"
fi
@nosolopau
Copy link
Author

To deploy with Capistrano to staging:

patapum

To deploy with Capistrano to production:

patapum parriba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment