зеркало из https://github.com/mozilla/fxa.git
fix(scripts): stop the release script getting hung up on colour codes
This commit is contained in:
Родитель
f28be9615b
Коммит
a808ae9d91
12
release.sh
12
release.sh
|
@ -48,7 +48,7 @@ set -e
|
|||
# 16. Tell the user what we did.
|
||||
|
||||
SCRIPT_DIR=`dirname "$0"`/_scripts
|
||||
CURRENT_BRANCH=`git branch | grep '^\*' | cut -d ' ' -f 2`
|
||||
CURRENT_BRANCH=`git branch --no-color | grep '^\*' | cut -d ' ' -f 2`
|
||||
|
||||
abort() {
|
||||
git checkout "$CURRENT_BRANCH" > /dev/null 2>&1
|
||||
|
@ -114,13 +114,13 @@ if [ "$CURRENT_BRANCH" = "$TRAIN_BRANCH" ]; then
|
|||
git pull origin "$TRAIN_BRANCH" > /dev/null 2>&1 || true
|
||||
else
|
||||
# 7. Otherwise checkout existing train branch or create fresh one from master.
|
||||
TRAIN_BRANCH_EXISTS=`git branch | awk '{$1=$1};1' | grep "^$TRAIN_BRANCH\$"` || true
|
||||
TRAIN_BRANCH_EXISTS=`git branch --no-color | awk '{$1=$1};1' | grep "^$TRAIN_BRANCH\$"` || true
|
||||
|
||||
if [ "$TRAIN_BRANCH_EXISTS" = "" ]; then
|
||||
git fetch origin $TRAIN_BRANCH > /dev/null 2>&1 || true
|
||||
|
||||
REMOTE_BRANCH="origin/$TRAIN_BRANCH"
|
||||
REMOTE_BRANCH_EXISTS=`git branch -r | awk '{$1=$1};1' | grep "^$REMOTE_BRANCH\$"` || true
|
||||
REMOTE_BRANCH_EXISTS=`git branch --no-color -r | awk '{$1=$1};1' | grep "^$REMOTE_BRANCH\$"` || true
|
||||
|
||||
if [ "$REMOTE_BRANCH_EXISTS" = "" ]; then
|
||||
echo "Warning: $TRAIN_BRANCH branch not found on local or remote, creating one from master."
|
||||
|
@ -139,7 +139,7 @@ fi
|
|||
# 8. For each of the "main" packages...
|
||||
bump() {
|
||||
# 8.1. List commits since the last tag.
|
||||
LOCAL_COMMITS=`git log $LAST_TAG..HEAD --pretty=oneline --abbrev-commit -- "$1"`
|
||||
LOCAL_COMMITS=`git log $LAST_TAG..HEAD --no-color --pretty=oneline --abbrev-commit -- "$1"`
|
||||
|
||||
# 8.2. For each commit...
|
||||
while read -r COMMIT; do
|
||||
|
@ -325,11 +325,11 @@ PRIVATE_BRANCH="$TRAIN_BRANCH-private"
|
|||
PRIVATE_REMOTE_BRANCH="$PRIVATE_REMOTE/$PRIVATE_BRANCH"
|
||||
|
||||
# 12. Create or checkout the private train branch.
|
||||
PRIVATE_BRANCH_EXISTS=`git branch | awk '{$1=$1};1' | grep "^$PRIVATE_BRANCH\$"` || true
|
||||
PRIVATE_BRANCH_EXISTS=`git branch --no-color | awk '{$1=$1};1' | grep "^$PRIVATE_BRANCH\$"` || true
|
||||
if [ "$PRIVATE_BRANCH_EXISTS" = "" ]; then
|
||||
git fetch "$PRIVATE_REMOTE" "$PRIVATE_BRANCH" > /dev/null 2>&1 || true
|
||||
|
||||
PRIVATE_REMOTE_BRANCH_EXISTS=`git branch -r | awk '{$1=$1};1' | grep "^$PRIVATE_REMOTE_BRANCH\$"` || true
|
||||
PRIVATE_REMOTE_BRANCH_EXISTS=`git branch --no-color -r | awk '{$1=$1};1' | grep "^$PRIVATE_REMOTE_BRANCH\$"` || true
|
||||
if [ "$PRIVATE_REMOTE_BRANCH_EXISTS" = "" ]; then
|
||||
echo "Warning: $PRIVATE_BRANCH branch not found on local or remote, creating one from $PRIVATE_REMOTE/master."
|
||||
git checkout --no-track -b "$PRIVATE_BRANCH" "$PRIVATE_REMOTE/master" > /dev/null 2>&1
|
||||
|
|
Загрузка…
Ссылка в новой задаче