Last active
November 11, 2015 16:32
-
-
Save nosolopau/bdfad33d414cdec0d8a5 to your computer and use it in GitHub Desktop.
The top-secret, ultimate, easy deployer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To deploy with Capistrano to staging:
To deploy with Capistrano to production: