-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/stage-stable' into prod-beta
- Loading branch information
Showing
64 changed files
with
465 additions
and
159 deletions.
There are no files selected for viewing
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
#!/bin/sh | ||
|
||
default() | ||
{ | ||
PATH=/usr/bin:/usr/sbin:${PATH} | ||
export PATH | ||
|
||
SCRIPT=`basename $0` | ||
SCRIPT_DIR=`dirname $0` | ||
SCRIPT_DIR=`cd $SCRIPT_DIR; pwd` | ||
|
||
MAIN_BRANCH="master" | ||
PROD_BETA_BRANCH="prod-beta" | ||
PROD_STABLE_BRANCH="prod-stable" | ||
STAGE_STABLE_BRANCH="stage-stable" | ||
|
||
KOKU_UI_REPO="[email protected]:project-koku/koku-ui.git" | ||
|
||
TMP_DIR="/tmp/$SCRIPT.$$" | ||
KOKU_UI_DIR="$TMP_DIR/koku-ui" | ||
} | ||
|
||
usage() | ||
{ | ||
cat <<- EEOOFF | ||
This script will release the selected branch by merging the following branches | ||
stage-stage is merged from stage-beta | ||
prod-beta is merged from stage-stable | ||
prod-stable is merged from prod-beta | ||
sh [-x] $SCRIPT [-h] -<b|p|s> | ||
OPTIONS: | ||
h Display this message | ||
b Prod beta | ||
p Prod stable | ||
s Stage stable | ||
EEOOFF | ||
} | ||
|
||
clone() | ||
{ | ||
mkdir $TMP_DIR | ||
cd $TMP_DIR | ||
|
||
git clone $KOKU_UI_REPO | ||
} | ||
|
||
|
||
merge() | ||
{ | ||
cd $KOKU_UI_DIR | ||
|
||
git checkout $BRANCH | ||
|
||
git fetch origin $REMOTE_BRANCH | ||
git merge origin/$REMOTE_BRANCH --commit --no-edit | ||
} | ||
|
||
push() | ||
{ | ||
read -p "You are pushing to the $BRANCH branch. Continue?" YN | ||
|
||
case $YN in | ||
[Yy]* ) git push -u origin $BRANCH;; | ||
[Nn]* ) exit 0;; | ||
* ) echo "Please answer yes or no."; push;; | ||
esac | ||
} | ||
|
||
# main() | ||
{ | ||
default | ||
|
||
while getopts hbps c; do | ||
case $c in | ||
b) BRANCH=$PROD_BETA_BRANCH | ||
REMOTE_BRANCH=$STAGE_STABLE_BRANCH;; | ||
p) BRANCH=$PROD_STABLE_BRANCH | ||
REMOTE_BRANCH=$PROD_BETA_BRANCH;; | ||
s) BRANCH=$STAGE_STABLE_BRANCH | ||
REMOTE_BRANCH=$MAIN_BRANCH;; | ||
h) usage; exit 0;; | ||
\?) usage; exit 1;; | ||
esac | ||
done | ||
|
||
if [ -z "$BRANCH" ]; then | ||
usage | ||
exit 1 | ||
fi | ||
|
||
echo "\nMerging $BRANCH from $REMOTE_BRANCH\n" | ||
|
||
clone | ||
merge | ||
|
||
if [ "$?" -eq 0 ]; then | ||
push | ||
else | ||
echo "Cannot not push. No changes or check for conflicts" | ||
fi | ||
|
||
rm -rf $TMP_DIR | ||
} |
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
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
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
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
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
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
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
Oops, something went wrong.