Last active
April 3, 2018 14:32
-
-
Save speeddragon/aa87b97297f06edeca3c8ec98d1e6a67 to your computer and use it in GitHub Desktop.
Travis CI - Edeliver (elixir) Deploy
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 [ $? -eq 0 ]; then | |
echo "Travis Branch: $TRAVIS_BRANCH" | |
DEPLOY_BRANCH="develop" | |
if [ "$TRAVIS_BRANCH" == "$DEPLOY_BRANCH" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then | |
# Hot swap need to know what is the current version | |
echo " :: Edeliver: Build" | |
#mix edeliver build upgrade | |
mix edeliver build release --branch=$DEPLOY_BRANCH | |
if [ $? -eq 0 ]; then | |
echo " :: [INFO] Successfully created build file!" | |
echo " :: Edeliver: Deploy" | |
#mix edeliver deploy upgrade | |
mix edeliver deploy release --start-deploy --branch=$DEPLOY_BRANCH | |
mix edeliver migrate | |
exit 0 | |
else | |
echo " :: [ERROR] Could not create file" | |
exit 1 | |
fi | |
fi | |
else | |
echo "Failed build!" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment