From 5ea2a69be24f7184ca54f95db31cf7fd5c70ebbf Mon Sep 17 00:00:00 2001 From: Nick Cooke Date: Wed, 2 Oct 2024 10:40:44 -0400 Subject: [PATCH 1/3] [Infra] Release testing should grab latest tag on any branch --- scripts/release_testing_setup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/release_testing_setup.sh b/scripts/release_testing_setup.sh index 010d558ca37..fbaad3fe5e3 100755 --- a/scripts/release_testing_setup.sh +++ b/scripts/release_testing_setup.sh @@ -25,8 +25,12 @@ git fetch --tags --quiet origin main git checkout main # The chunk below is to determine the latest version by searching -# Get the latest released tag Cocoapods-X.Y.Z for release and prerelease testing, beta version will be excluded. -test_version=$(git tag -l --sort=-version:refname --merged main 'CocoaPods-*[0-9]' | head -n 1) +# Get the latest released tag Cocoapods-X.Y.Z for release and prerelease +# testing, beta version will be excluded. +# Note: If a long running release branch's tags are keeping the next tagged +# release on main from being tested, add `--merged main` to the below git tag +# command. Doing so will exclude tags that don't exist on main. +test_version=$(git tag -l --sort=-version:refname 'CocoaPods-*[0-9]' | head -n 1) if [ -z "$test_version" ]; then echo "Latest tag could not be found. Exiting." >&2 exit 1 From 400bd87134ee997bec14467e68bb88ac80d9fffe Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:04:41 -0400 Subject: [PATCH 2/3] Review --- scripts/release_testing_setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/release_testing_setup.sh b/scripts/release_testing_setup.sh index fbaad3fe5e3..15cef62deb8 100755 --- a/scripts/release_testing_setup.sh +++ b/scripts/release_testing_setup.sh @@ -27,10 +27,10 @@ git checkout main # The chunk below is to determine the latest version by searching # Get the latest released tag Cocoapods-X.Y.Z for release and prerelease # testing, beta version will be excluded. -# Note: If a long running release branch's tags are keeping the next tagged -# release on main from being tested, add `--merged main` to the below git tag -# command. Doing so will exclude tags that don't exist on main. -test_version=$(git tag -l --sort=-version:refname 'CocoaPods-*[0-9]' | head -n 1) +# Note: If the nightly tag was not updated, check that the next release's tag +# is on the main branch. +test_version=$(git tag -l --sort=-version:refname --merged main 'CocoaPods-*[0-9]' | head -n 1) + if [ -z "$test_version" ]; then echo "Latest tag could not be found. Exiting." >&2 exit 1 From 47142abb2dbe8e6b8af7e93898bcf22f6a39a8ea Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:05:07 -0400 Subject: [PATCH 3/3] Update scripts/release_testing_setup.sh --- scripts/release_testing_setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/release_testing_setup.sh b/scripts/release_testing_setup.sh index 15cef62deb8..99206e37485 100755 --- a/scripts/release_testing_setup.sh +++ b/scripts/release_testing_setup.sh @@ -30,7 +30,6 @@ git checkout main # Note: If the nightly tag was not updated, check that the next release's tag # is on the main branch. test_version=$(git tag -l --sort=-version:refname --merged main 'CocoaPods-*[0-9]' | head -n 1) - if [ -z "$test_version" ]; then echo "Latest tag could not be found. Exiting." >&2 exit 1