Skip to content

Commit

Permalink
chore(scripts/create-adaptation-pr): auto mode by default, no-edit me…
Browse files Browse the repository at this point in the history
…rges (#18485)

Sets the default value of `--AUTO` to `yes`
Adds the `--no-edit` flag to the merge commands in the script
  • Loading branch information
jcommelin committed Oct 31, 2024
1 parent ee37658 commit 348232e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/create-adaptation-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set -e # abort whenever a command in the script fails
{

# Default values
AUTO="no"
AUTO="yes"

# Function to display usage
usage() {
Expand All @@ -25,7 +25,7 @@ usage() {
echo "BUMPVERSION: The upcoming release that we are targeting, e.g., 'v4.10.0'"
echo "NIGHTLYDATE: The date of the nightly toolchain currently used on 'nightly-testing'"
echo "NIGHTLYSHA: The SHA of the nightly toolchain that we want to adapt to"
echo "AUTO: Optional flag to specify automatic mode, default is 'no'"
echo "AUTO: Optional flag to specify automatic mode, default is 'yes'"
exit 1
}

Expand Down Expand Up @@ -90,7 +90,7 @@ echo "### [auto] checkout 'bump/$BUMPVERSION' and merge the latest changes from

git checkout "bump/$BUMPVERSION"
git pull
git merge origin/master || true # ignore error if there are conflicts
git merge --no-edit origin/master || true # ignore error if there are conflicts

# Check if there are merge conflicts
if git diff --name-only --diff-filter=U | grep -q .; then
Expand Down Expand Up @@ -135,7 +135,7 @@ echo
echo "### [auto] create a new branch 'bump/nightly-$NIGHTLYDATE' and merge the latest changes from 'origin/nightly-testing'"

git checkout -b "bump/nightly-$NIGHTLYDATE"
git merge $NIGHTLYSHA || true # ignore error if there are conflicts
git merge --no-edit $NIGHTLYSHA || true # ignore error if there are conflicts

# Check if there are merge conflicts
if git diff --name-only --diff-filter=U | grep -q .; then
Expand Down Expand Up @@ -252,7 +252,7 @@ echo "### [auto] checkout the 'nightly-testing' branch and merge the new branch

git checkout nightly-testing
git pull
git merge "bump/nightly-$NIGHTLYDATE" || true # ignore error if there are conflicts
git merge --no-edit "bump/nightly-$NIGHTLYDATE" || true # ignore error if there are conflicts

# Check if there are merge conflicts
if git diff --name-only --diff-filter=U | grep -q .; then
Expand Down

0 comments on commit 348232e

Please sign in to comment.