Skip to content

Commit f395890

Browse files
authored
Update release tag in testing. (#7960)
* Update release tag in testing. * Test workflow
1 parent 3538baf commit f395890

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: release
22

33
on:
4+
pull_request:
5+
paths:
6+
- 'scripts/release_testing_setup.sh'
47
workflow_dispatch:
58
schedule:
69
# Run every day at 11pm (PST) - cron uses UTC times

scripts/release_testing_setup.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ git config --global user.email "google-oss-bot@example.com"
4545
git config --global user.name "google-oss-bot"
4646
git checkout "${podspec_repo_branch}"
4747
if [ "$TESTINGMODE" = "release_testing" ]; then
48-
# Latest release branch on the repo, e.g. Cocoapods-7.9.0
49-
latest_release_branch_tag=$(git branch -l -r --sort=-v:refname origin/release-* | head -n 1 | sed -n 's/origin\/release/CocoaPods/p')
48+
# Latest release branch with prefix CocoaPods, e.g. CocoaPods-7.11
49+
latest_branch_version=$(git branch -l -r --sort=-v:refname origin/release-* | head -n 1 | sed -n 's/^[ \t]*origin\/release/CocoaPods/p' )
50+
# Latest tag of release branch on the repo, e.g. Cocoapods-7.9.0
51+
latest_release_branch_tag=$(git tag -l --sort=-version:refname "$latest_branch_version"*[0-9] | head -n 1)
5052
echo "Podspecs tags of Nightly release testing will be updated to ${latest_release_branch_tag}."
5153
# Update source and tag, e.g. ":tag => 'CocoaPods-' + s.version.to_s" to
5254
# ":tag => 'CocoaPods-7.9.0'"

0 commit comments

Comments
 (0)