зеркало из https://github.com/mozilla/fxa.git
chore(scripts): only show the private diff size warning on train builds
This commit is contained in:
Родитель
fdc61382af
Коммит
a8f415ec5a
36
release.sh
36
release.sh
|
@ -380,25 +380,25 @@ echo " https://github.com/mozilla/fxa/compare/$TRAIN_BRANCH?expand=1"
|
|||
echo " https://github.com/mozilla/fxa-private/compare/$PRIVATE_BRANCH?expand=1"
|
||||
echo
|
||||
|
||||
PRIVATE_DIFF_SIZE=`git diff "$PRIVATE_BRANCH..$PRIVATE_DIFF_FROM" | wc -l | awk '{$1=$1};1'`
|
||||
IS_BIG_RELEASE=`expr "$PRIVATE_DIFF_SIZE" \> 300`
|
||||
if [ "$IS_BIG_RELEASE" = "1" ]; then
|
||||
echo "The diff for the private release is pretty big. You may want to add the following comment to that PR:"
|
||||
echo
|
||||
echo "> There's no need to review every line of this diff, since it includes every commit from the release. Instead you can do the following:"
|
||||
echo ">"
|
||||
echo '> ```'
|
||||
echo "> git fetch origin $TRAIN_BRANCH"
|
||||
echo "> git fetch $PRIVATE_REMOTE $PRIVATE_BRANCH"
|
||||
echo "> git checkout -b $PRIVATE_BRANCH $PRIVATE_REMOTE/$PRIVATE_BRANCH"
|
||||
echo "> git diff origin/$TRAIN_BRANCH"
|
||||
echo '> ```'
|
||||
echo ">"
|
||||
echo "> That diff should show only the changes from the private repo, proving that the $TRAIN_BRANCH branches are equal in other respects."
|
||||
echo
|
||||
fi
|
||||
|
||||
if [ "$BUILD_TYPE" = "Train" ]; then
|
||||
PRIVATE_DIFF_SIZE=`git diff "$PRIVATE_BRANCH..$PRIVATE_DIFF_FROM" | wc -l | awk '{$1=$1};1'`
|
||||
IS_BIG_RELEASE=`expr "$PRIVATE_DIFF_SIZE" \> 400`
|
||||
if [ "$IS_BIG_RELEASE" = "1" ]; then
|
||||
echo "The diff for the private release is pretty big. You may want to add the following comment to that PR:"
|
||||
echo
|
||||
echo "> There's no need to review every line of this diff, since it includes every commit from the release. Instead you can do the following:"
|
||||
echo ">"
|
||||
echo '> ```'
|
||||
echo "> git fetch origin $TRAIN_BRANCH"
|
||||
echo "> git fetch $PRIVATE_REMOTE $PRIVATE_BRANCH"
|
||||
echo "> git checkout -b $PRIVATE_BRANCH $PRIVATE_REMOTE/$PRIVATE_BRANCH"
|
||||
echo "> git diff origin/$TRAIN_BRANCH"
|
||||
echo '> ```'
|
||||
echo ">"
|
||||
echo "> That diff should show only the changes from the private repo, proving that the $TRAIN_BRANCH branches are equal in other respects."
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "If there's no deploy bug for $TRAIN_BRANCH yet, you should create one using this URL:"
|
||||
echo
|
||||
echo " $DEPLOY_BUG_URL"
|
||||
|
|
Загрузка…
Ссылка в новой задаче