Skip to content

Commit aeeb015

Browse files
authored
Fix release workflow. (#7859)
1 parent 4ac113a commit aeeb015

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/release_testing_setup.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ if [ -z $release_branch ];then
4848
fi
4949

5050
if [ -z $podspec_repo_branch ];then
51-
# Get release branch, release-X.Y.Z.
52-
podspec_repo_branch=$(echo $release_branch | sed -n 's/\s*origin\///p')
51+
# Get release branch, origin/release-X.Y.Z.
52+
podspec_repo_branch=$(echo $release_branch | sed -n 's/[[:blank:]]//p')
5353
fi
5454

5555
git config --global user.email "[email protected]"
5656
git config --global user.name "google-oss-bot"
57+
git checkout "${podspec_repo_branch}"
5758
if [ "$TESTINGMODE" = "release_testing" ]; then
58-
git checkout "${release_branch}"
5959
# Latest Cocoapods tag on the repo, e.g. Cocoapods-7.9.0
6060
latest_cocoapods_tag=$(git tag -l --sort=-version:refname CocoaPods-*[0-9] | head -n 1 )
6161
echo "Podspecs tags of Nightly release testing will be updated to ${latest_cocoapods_tag}."
@@ -65,7 +65,6 @@ if [ "$TESTINGMODE" = "release_testing" ]; then
6565
elif [ "$TESTINGMODE" = "prerelease_testing" ]; then
6666
tag_version="CocoaPods-${test_version}.nightly"
6767
echo "A new tag, ${tag_version},for prerelease testing will be created."
68-
git checkout "${podspec_repo_branch}"
6968
set +e
7069
# If tag_version is new to the remote, remote cannot delete a non-existent
7170
# tag, so error is allowed here.

0 commit comments

Comments
 (0)