Skip to content

Commit

Permalink
Update regular expression to extract Swift version in source download…
Browse files Browse the repository at this point in the history
… script, which didn't handle 5.10.1 properly

Also, remove patch that was upstreamed.
  • Loading branch information
finagolfin committed Jun 7, 2024
1 parent 668a900 commit 53a85c8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
git apply swift-android-ci.patch
git apply -C1 swift-android.patch swift-android-both-ndks.patch
if [[ ${{ matrix.version }} = 'release'* ]]; then
git apply swift-android-tsc.patch swift-android-stdlib-except-trunk.patch
git apply swift-android-stdlib-except-trunk.patch
STUPID_FILE_RENAMING=Tool
else
sed -i "s%r26%ndk/26%" swift/stdlib/cmake/modules/AddSwiftStdlib.cmake
Expand Down
2 changes: 1 addition & 1 deletion get-packages-and-swift-source.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var sdkDir = "", icuVersion = "", icuMajorVersion = "", swiftVersion = "",
swiftBranch = "", swiftSnapshotDate = ""

let tagRange = NSRange(SWIFT_TAG.startIndex..., in: SWIFT_TAG)
let tagExtract = try NSRegularExpression(pattern: "swift-([0-9]+\\.[0-9])?\\.?[0-9]*-?([A-Z-]+)([0-9-]+[0-9])?")
let tagExtract = try NSRegularExpression(pattern: "swift-([5-9]\\.[0-9]+)?\\.?[1-9]*-?([A-Z-]+)([0-9-]+[0-9])?")

if tagExtract.numberOfMatches(in: SWIFT_TAG, range: tagRange) == 1 {
let match = tagExtract.firstMatch(in: SWIFT_TAG, range: tagRange)
Expand Down
92 changes: 0 additions & 92 deletions swift-android-tsc.patch

This file was deleted.

0 comments on commit 53a85c8

Please sign in to comment.