Created
December 3, 2012 14:22
-
-
Save marc0der/4195319 to your computer and use it in GitHub Desktop.
Deploy GVM
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 | |
ENV="$1" | |
TAG="$2" | |
if [[ -z "$ENV" || -z "$TAG" ]]; then | |
echo "Usage: deploy-gvm <env> <tag>" | |
exit 0 | |
fi | |
git checkout master | |
git branch -D "$ENV" | |
gradle -i | |
git checkout -b "$ENV" | |
git add -f build | |
cp -v "/path/to/configs/mongo.$ENV.json" mongo.json | |
git add -f mongo.json | |
git commit -m "Release tag: $TAG" | |
git tag "$TAG" | |
git push -f "$ENV" "$ENV":master | |
git checkout master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment