Skip to content

Commit 053d2b1

Browse files
committed
Turn the last trunk-only patch into a perl substitution instead and reorganize the patches a bit
1 parent 7cabdfd commit 053d2b1

File tree

2 files changed

+8
-26
lines changed

2 files changed

+8
-26
lines changed

swift-ci/sdks/android/patches/apply-patches.sh

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,15 @@
22

33
patches_dir=$(dirname $(realpath -- "${BASH_SOURCE[0]}"))
44
cd ${1}
5+
git apply -v -C1 ${patches_dir}/swift-android.patch
56

6-
case "${BUILD_SCHEME}" in
7-
swift-*-branch)
8-
git apply -v -C1 ${patches_dir}/swift-android-devel.patch
9-
git apply -v -C1 ${patches_dir}/swift-android.patch
10-
;;
11-
development)
12-
git apply -v -C1 ${patches_dir}/swift-android.patch
13-
git apply -v -C1 ${patches_dir}/swift-android-trunk.patch
14-
;;
15-
*)
16-
echo "$0: invalid BUILD_SCHEME=${BUILD_SCHEME}"
17-
exit 1
18-
;;
19-
esac
7+
if [[ "${BUILD_SCHEME}" == "swift-6.2-branch" ]]; then
8+
git apply -v -C1 ${patches_dir}/swift-android-devel.patch
9+
else
10+
# This `git grep` invocation in a trunk test fails in our Docker for some
11+
# reason, so just turn it into a plain `grep` again.
12+
perl -pi -e 's:"git",:#:' swift/test/Misc/verify-swift-feature-testing.test-sh
13+
fi
2014

2115
# disable backtrace() for Android (needs either API33+ or libandroid-execinfo, or to manually add in backtrace backport)
2216
perl -pi -e 's;os\(Android\);os\(AndroidDISABLED\);g' swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift

swift-ci/sdks/android/patches/swift-android-trunk.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)