Repository navigation
Update every iOS pin when bumping the proxy version, and fail if one moves - #784
Merged
Merged
Conversation
…moves The podspec migrated from s.dependency to spm_dependency in the 27.0.0 release commit, so the sed that targeted s.dependency now matches nothing. sed exits 0 on a zero-match, which set -euxo pipefail does not catch, and Package.swift was never touched at all. The next proxy bump would have moved Android and left both iOS pins where they were, with nothing reporting it. Each pin is now located before any file is written, so a pattern that has moved again fails the run instead of leaving the tree half bumped. An optional second argument bumps the ios-library pins, which track their own version. Checked by running it: a proxy bump rewrites all three pins and leaves ios-library alone; both versions rewrite all five; a renamed pin exits 1 with gradle.properties untouched; no arguments prints usage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Ulrico972
reviewed
Oct 26, 2026
Ulrico972
left a comment
Contributor
There was a problem hiding this comment.
A few things I want to flag for a second look — nothing blocking, just checking whether these are intentional.
The version was concatenated into the perl replacement, so a `}` in the argument closed the replacement and the remainder ran as Perl, and a bare $ or @ interpolated silently. It now reaches perl through the environment, and an argument that is not a version number is rejected before anything is written. verify_pin searched the whole file for the version string. gradle.properties carries minSdkVersion=26 and ndkversion=26.1.x beside the pin, so a short version could report ok while the pin itself was never rewritten. It reads the pin back through the same pattern now. The .bak files are removed only once every pin verifies, so a failed check leaves something to restore from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
crow
approved these changes
Oct 28, 2026
perl only warns on a file it cannot open and still exits 0, so the match count came back empty. An empty count is not a number, the numeric test errored, and an errored test inside `if` reads as a pass. A missing Package.swift therefore cleared the pre-flight check, and the run rewrote gradle.properties and the podspec before failing at verify - the half bumped tree the check exists to prevent. The file is now checked for readability first, and the count defaults to zero so an empty value can never read as one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
Make
update_proxy_version.shrewrite every iOS pin, and fail if one of themhas moved instead of carrying on.
Why are these changes necessary?
The script looked for
s.dependency "AirshipFrameworkProxy"in the podspec.That line stopped existing when the podspec moved to
spm_dependency, in the27.0.0 release commit. A substitution that matches nothing still exits 0, which
set -euxo pipefaildoes not catch, andPackage.swiftwas never touched atall.
27.0.0 itself shipped correct pins, because that commit did the migration by
hand. The next proxy bump is the one that would have moved Android and left
both iOS pins behind, with nothing reporting it — a release where the two
platforms run different SDK versions.
How did you verify these changes?
Ran it against the repo:
Package.swift, andleaves the ios-library pins alone
gradle.propertiesstill untouchedAnything else a reviewer should know?
Every pin is located before any file is written. The earlier version of this
change checked as it went, which left the tree half bumped when it hit the
missing pin.
The optional second argument exists because
Package.swiftpins ios-libraryindependently of the proxy, so one version cannot drive both.
🤖 Generated with Claude Code