Created
January 13, 2015 14:38
-
-
Save MattKetmo/5c381fa9ecbe712b1dc9 to your computer and use it in GitHub Desktop.
Simple script to create branch on Bamboo
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 | |
set -e | |
if [ $# -lt 2 ]; then | |
echo "Usage: $0 <plan> <branch>" | |
exit 1 | |
fi | |
PLAN=$1 | |
BRANCH=$2 | |
BASE_URL="http://localhost:8085" | |
read -p "Username: " USERNAME | |
stty -echo | |
read -p "Password: " PASSWORD; echo | |
stty echo | |
echo "Creating the branch...\n" | |
curl -i -X PUT \ | |
--user $USERNAME:$PASSWORD \ | |
"$BASE_URL/rest/api/latest/plan/$PLAN/branch/$BRANCH?vcsBranch=$BRANCH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment