@@ -23,36 +23,26 @@ if [ -f "${HOME}/.cocoapods/repos" ]; then
23
23
fi
24
24
25
25
mkdir -p " ${local_sdk_repo_dir} "
26
- echo " git clone ${podspec_repo_branch} from github.com/firebase/firebase-ios-sdk.git to ${local_sdk_repo_dir} "
26
+ echo " git clone from github.com/firebase/firebase-ios-sdk.git to ${local_sdk_repo_dir} "
27
27
set +x
28
28
# Using token here to update tags later.
29
29
git clone -q https://" ${BOT_TOKEN} " @github.com/firebase/firebase-ios-sdk.git " ${local_sdk_repo_dir} "
30
30
set -x
31
31
32
32
cd " ${local_sdk_repo_dir} "
33
33
# The chunk below is to determine the latest version by searching
34
- # Get the latest origin/release-X.Y.Z branch in the remote repo for release branch testing.
35
- release_branch=$( git branch -l -r --sort=-version:refname origin/release-* | head -n 1 )
36
- # Get the latest released tag Cocoapods-X.Y.Z for prerelease testing, beta version will be excluded.
34
+ # Get the latest released tag Cocoapods-X.Y.Z for release and prerelease testing, beta version will be excluded.
37
35
test_version=$( git tag -l --sort=-version:refname CocoaPods-* [0-9] | head -n 1)
38
36
39
- if [ -z $podspec_repo_branch ]; then
40
- # Get release branch, origin/release-X.Y.Z.
41
- podspec_repo_branch=$( echo $release_branch | sed -n ' s/\s*//p' )
42
- fi
43
-
44
37
git config --global user.email
" [email protected] "
45
38
git config --global user.name " google-oss-bot"
46
39
git checkout " ${podspec_repo_branch} "
47
40
if [ " $TESTINGMODE " = " release_testing" ]; then
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)
52
- echo " Podspecs tags of Nightly release testing will be updated to ${latest_release_branch_tag} ."
41
+ git checkout " ${test_version} "
42
+ echo " Podspecs tags of Nightly release testing will be updated to ${test_version} ."
53
43
# Update source and tag, e.g. ":tag => 'CocoaPods-' + s.version.to_s" to
54
44
# ":tag => 'CocoaPods-7.9.0'"
55
- sed -i " " " s/\s*:tag.*/:tag => '${latest_release_branch_tag } '/" * .podspec
45
+ sed -i " " " s/\s*:tag.*/:tag => '${test_version } '/" * .podspec
56
46
elif [ " $TESTINGMODE " = " prerelease_testing" ]; then
57
47
tag_version=" ${test_version} .nightly"
58
48
echo " A new tag, ${tag_version} ,for prerelease testing will be created."
0 commit comments