Skip to content

Commit 5347bfd

Browse files
committed
1 parent f73aff4 commit 5347bfd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

swift-ci/sdks/android/scripts/patch-sources.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ fi
2121
cd ${source_dir}/swift-project
2222
swift_android_patch="${patches_dir}/swift-android.patch"
2323

24+
ls -la swift/utils/build-script-impl
25+
ls -la ${swift_android_patch}
26+
ls -la swiftpm/Sources/PackageRegistryCommand/PackageRegistryCommand+Auth.swift
27+
2428
# patch the patch, which seems to only be needed for an API less than 28
2529
# https://github.com/finagolfin/swift-android-sdk/blob/main/swift-android.patch#L110
2630
perl -pi -e 's/#if os\(Windows\)/#if os\(Android\)/g' $swift_android_patch
@@ -55,7 +59,9 @@ for patch in "$swift_android_patch" "$testing_patch" "$dispatch_patch"; do
5559
fi
5660

5761
echo "applying patch $patch in $PWD"
58-
git apply -v --unsafe-paths -C1 "$patch"
62+
# first check to make sure the patches can apply and fail if not
63+
git apply -v --check -C1 "$patch"
64+
git apply -v -C1 "$patch"
5965

6066
#if git apply -C1 --reverse --check "$patch" >/dev/null 2>&1 ; then
6167
# echo "already patched"

0 commit comments

Comments
 (0)