Skip to content

Commit 27d462b

Browse files
authored
[Infra] Removing 'release.yml' special casing in 'scripts/release_testing_setup.sh' (#13447)
1 parent f0fdd5b commit 27d462b

File tree

2 files changed

+12
-27
lines changed

2 files changed

+12
-27
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,35 +22,29 @@ jobs:
2222
runs-on: macos-14
2323
env:
2424
bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
25-
# The SDK repo will be cloned to this dir and podspecs from
26-
# 'podspec_repo_branch' of this repo will be validated and pushed to the
27-
# testing repo.
28-
local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
2925
local_repo: specsreleasing
3026
podspec_repo_branch: main
3127
outputs:
3228
matrix: ${{ steps.generate_matrix.outputs.matrix }}
3329
steps:
3430
- name: Checkout code
3531
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
3634
- name: Generate matrix
3735
id: generate_matrix
3836
run: |
3937
cd "${GITHUB_WORKSPACE}/ReleaseTooling"
4038
swift run manifest --sdk-repo-url "${GITHUB_WORKSPACE}" --output-file-path ./output.json --for-gha-matrix-generation
4139
echo "::set-output name=matrix::{\"include\":$( cat output.json )}"
40+
- name: Update SpecsReleasing repo setup
41+
run: |
42+
podspec_repo_branch="${podspec_repo_branch}" \
43+
scripts/release_testing_setup.sh release_testing
4244
- name: Get token
4345
run: |
4446
scripts/decrypt_gha_secret.sh scripts/gha-encrypted/release-testing-token.txt.gpg \
4547
bot-access.txt "$bot_token_secret"
46-
- name: Update SpecsReleasing repo setup
47-
run: |
48-
botaccess=`cat bot-access.txt`
49-
BOT_TOKEN="${botaccess}" test_version="${nightly_version}" \
50-
sdk_version_config="${GITHUB_WORKSPACE}/scripts/create_spec_repo/RC_firebase_sdk.textproto" \
51-
local_sdk_repo_dir="${local_sdk_repo_dir}" \
52-
podspec_repo_branch="${podspec_repo_branch}" \
53-
scripts/release_testing_setup.sh release_testing
5448
- name: Clean spec repo
5549
run: |
5650
botaccess=`cat bot-access.txt`
@@ -70,8 +64,9 @@ jobs:
7064
with:
7165
name: firebase-ios-sdk
7266
path: |
73-
${{ env.local_sdk_repo_dir }}/*.podspec
74-
${{ env.local_sdk_repo_dir }}/*.podspec.json
67+
*.podspec
68+
*.podspec.json
69+
7570
buildup_SpecsReleasing_repo_FirebaseCore:
7671
needs: specs_checking
7772
# Don't run on private repo unless it is a PR.

scripts/release_testing_setup.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# This script will `git clone` the SDK repo to local and look for the latest
16-
# release branch
15+
# Note: This script uses the currently checked out repo.
1716
set -xe
1817

1918
TESTINGMODE=${1-}
@@ -22,17 +21,8 @@ if [ -f "${HOME}/.cocoapods/repos" ]; then
2221
find "${HOME}/.cocoapods/repos" -type d -maxdepth 1 -exec sh -c 'pod repo remove $(basename {})' \;
2322
fi
2423

25-
if [ "$TESTINGMODE" = "release_testing" ]; then
26-
mkdir -p "${local_sdk_repo_dir}"
27-
echo "git clone from github.com/firebase/firebase-ios-sdk.git to ${local_sdk_repo_dir}"
28-
set +x
29-
# Using token here to update tags later.
30-
git clone -q https://"${BOT_TOKEN}"@github.com/firebase/firebase-ios-sdk.git "${local_sdk_repo_dir}"
31-
set -x
32-
cd "${local_sdk_repo_dir}"
33-
elif [ "$TESTINGMODE" = "prerelease_testing" ]; then
34-
git fetch --tags --quiet origin main
35-
fi
24+
git fetch --tags --quiet origin main
25+
git checkout main
3626

3727
# The chunk below is to determine the latest version by searching
3828
# Get the latest released tag Cocoapods-X.Y.Z for release and prerelease testing, beta version will be excluded.

0 commit comments

Comments
 (0)