From baea0f58266a46262d0d8258c452f0e5a726a467 Mon Sep 17 00:00:00 2001 From: Sebastien Stormacq Date: Sat, 4 Jan 2025 17:07:27 +0100 Subject: [PATCH] Simplify examples's Package.swift --- Examples/APIGateway/Package.swift | 8 +------- Examples/BackgroundTasks/Package.swift | 8 +------- Examples/CDK/Package.swift | 8 +------- Examples/HelloWorld/Package.swift | 8 +------- Examples/S3_AWSSDK/Package.swift | 8 +------- Examples/S3_Soto/Package.swift | 8 +------- Examples/Streaming/Package.swift | 8 +------- 7 files changed, 7 insertions(+), 49 deletions(-) diff --git a/Examples/APIGateway/Package.swift b/Examples/APIGateway/Package.swift index 13ef31f5..df13380d 100644 --- a/Examples/APIGateway/Package.swift +++ b/Examples/APIGateway/Package.swift @@ -5,15 +5,9 @@ import PackageDescription // needed for CI to test the local version of the library import struct Foundation.URL -#if os(macOS) -let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)] -#else -let platforms: [PackageDescription.SupportedPlatform]? = nil -#endif - let package = Package( name: "swift-aws-lambda-runtime-example", - platforms: platforms, + platforms: [.macOS(.v15)], products: [ .executable(name: "APIGatewayLambda", targets: ["APIGatewayLambda"]) ], diff --git a/Examples/BackgroundTasks/Package.swift b/Examples/BackgroundTasks/Package.swift index 5e703b0b..3d5b52bb 100644 --- a/Examples/BackgroundTasks/Package.swift +++ b/Examples/BackgroundTasks/Package.swift @@ -5,15 +5,9 @@ import PackageDescription // needed for CI to test the local version of the library import struct Foundation.URL -#if os(macOS) -let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)] -#else -let platforms: [PackageDescription.SupportedPlatform]? = nil -#endif - let package = Package( name: "swift-aws-lambda-runtime-example", - platforms: platforms, + platforms: [.macOS(.v15)], products: [ .executable(name: "BackgroundTasks", targets: ["BackgroundTasks"]) ], diff --git a/Examples/CDK/Package.swift b/Examples/CDK/Package.swift index 13ef31f5..df13380d 100644 --- a/Examples/CDK/Package.swift +++ b/Examples/CDK/Package.swift @@ -5,15 +5,9 @@ import PackageDescription // needed for CI to test the local version of the library import struct Foundation.URL -#if os(macOS) -let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)] -#else -let platforms: [PackageDescription.SupportedPlatform]? = nil -#endif - let package = Package( name: "swift-aws-lambda-runtime-example", - platforms: platforms, + platforms: [.macOS(.v15)], products: [ .executable(name: "APIGatewayLambda", targets: ["APIGatewayLambda"]) ], diff --git a/Examples/HelloWorld/Package.swift b/Examples/HelloWorld/Package.swift index 5f2421be..17d5e4a4 100644 --- a/Examples/HelloWorld/Package.swift +++ b/Examples/HelloWorld/Package.swift @@ -5,15 +5,9 @@ import PackageDescription // needed for CI to test the local version of the library import struct Foundation.URL -#if os(macOS) -let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)] -#else -let platforms: [PackageDescription.SupportedPlatform]? = nil -#endif - let package = Package( name: "swift-aws-lambda-runtime-example", - platforms: platforms, + platforms: [.macOS(.v15)], products: [ .executable(name: "MyLambda", targets: ["MyLambda"]) ], diff --git a/Examples/S3_AWSSDK/Package.swift b/Examples/S3_AWSSDK/Package.swift index 5417fbdd..fa1426fd 100644 --- a/Examples/S3_AWSSDK/Package.swift +++ b/Examples/S3_AWSSDK/Package.swift @@ -5,15 +5,9 @@ import PackageDescription // needed for CI to test the local version of the library import struct Foundation.URL -#if os(macOS) -let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)] -#else -let platforms: [PackageDescription.SupportedPlatform]? = nil -#endif - let package = Package( name: "AWSSDKExample", - platforms: platforms, + platforms: [.macOS(.v15)], products: [ .executable(name: "AWSSDKExample", targets: ["AWSSDKExample"]) ], diff --git a/Examples/S3_Soto/Package.swift b/Examples/S3_Soto/Package.swift index 4b4eead1..25b891a8 100644 --- a/Examples/S3_Soto/Package.swift +++ b/Examples/S3_Soto/Package.swift @@ -5,15 +5,9 @@ import PackageDescription // needed for CI to test the local version of the library import struct Foundation.URL -#if os(macOS) -let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)] -#else -let platforms: [PackageDescription.SupportedPlatform]? = nil -#endif - let package = Package( name: "SotoExample", - platforms: platforms, + platforms: [.macOS(.v15)], products: [ .executable(name: "SotoExample", targets: ["SotoExample"]) ], diff --git a/Examples/Streaming/Package.swift b/Examples/Streaming/Package.swift index b368d22b..b29dc961 100644 --- a/Examples/Streaming/Package.swift +++ b/Examples/Streaming/Package.swift @@ -5,15 +5,9 @@ import PackageDescription // needed for CI to test the local version of the library import struct Foundation.URL -#if os(macOS) -let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)] -#else -let platforms: [PackageDescription.SupportedPlatform]? = nil -#endif - let package = Package( name: "swift-aws-lambda-runtime-example", - platforms: platforms, + platforms: [.macOS(.v15)], products: [ .executable(name: "StreamingNumbers", targets: ["StreamingNumbers"]) ],