From 1ed23ed6b55195de8cf7e69c888edff9fa9263a8 Mon Sep 17 00:00:00 2001 From: Alex Russell-Saw Date: Wed, 30 Oct 2024 15:24:36 +0000 Subject: [PATCH 1/2] add header to build container Signed-off-by: Alex Russell-Saw --- package/ffi/sdks/swift.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/ffi/sdks/swift.go b/package/ffi/sdks/swift.go index fb875092..438a2ba2 100644 --- a/package/ffi/sdks/swift.go +++ b/package/ffi/sdks/swift.go @@ -53,7 +53,8 @@ func (s *SwiftSDK) Build(ctx context.Context, client *dagger.Client, hostDirecto repository := git. WithExec([]string{"git", "clone", "https://github.com/flipt-io/flipt-client-sdks.git", "/src"}). WithWorkdir("/src"). - WithDirectory("/tmp/ext", hostDirectory.Directory("tmp/glibc")) + WithDirectory("/tmp/ext", hostDirectory.Directory("tmp/glibc")). + WithFile("/tmp/ext/flipt_engine.h", hostDirectory.File("flipt-engine-ffi/include/flipt_engine.h")) filtered := repository. WithEnvVariable("FILTER_BRANCH_SQUELCH_WARNING", "1"). From b5027be1593ad262665e8534499867faf452d9ba Mon Sep 17 00:00:00 2001 From: Alex Russell-Saw Date: Wed, 30 Oct 2024 15:26:35 +0000 Subject: [PATCH 2/2] fix tree filter Signed-off-by: Alex Russell-Saw --- package/ffi/sdks/swift.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/ffi/sdks/swift.go b/package/ffi/sdks/swift.go index 438a2ba2..bd33b88a 100644 --- a/package/ffi/sdks/swift.go +++ b/package/ffi/sdks/swift.go @@ -60,7 +60,7 @@ func (s *SwiftSDK) Build(ctx context.Context, client *dagger.Client, hostDirecto WithEnvVariable("FILTER_BRANCH_SQUELCH_WARNING", "1"). WithExec([]string{"git", "filter-branch", "-f", "--prune-empty", "--subdirectory-filter", "flipt-client-swift", - "--tree-filter", "cp /tmp/ext/ios_arm64/libfliptengine.a Sources/FliptEngineFFI.xcframework/ios-arm64/; cp /tmp/ext/ios_arm64_sim/libfliptengine.a Sources/FliptEngineFFI.xcframework/ios-arm64-simulator/; cp flipt-engine-ffi/include/flipt_engine.h Sources/FliptEngineFFI.xcframework/ios-arm64/; cp flipt-engine-ffi/include/flipt_engine.h Sources/FliptEngineFFI.xcframework/ios-arm64-simulator/", + "--tree-filter", "cp /tmp/ext/ios_arm64/libfliptengine.a Sources/FliptEngineFFI.xcframework/ios-arm64/; cp /tmp/ext/ios_arm64_sim/libfliptengine.a Sources/FliptEngineFFI.xcframework/ios-arm64-simulator/; cp /tmp/ext/flipt_engine.h Sources/FliptEngineFFI.xcframework/ios-arm64/; cp /tmp/ext/flipt_engine.h Sources/FliptEngineFFI.xcframework/ios-arm64-simulator/", "--", opts.Tag}) _, err := filtered.Sync(ctx)