Skip to content

Commit 3fa610d

Browse files
authored
[examples] Simplify examples's Package.swift (#454)
remove the platform dance on all examples.
1 parent eebfd61 commit 3fa610d

File tree

7 files changed

+7
-49
lines changed

7 files changed

+7
-49
lines changed

Examples/APIGateway/Package.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "APIGatewayLambda", targets: ["APIGatewayLambda"])
1913
],

Examples/BackgroundTasks/Package.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "BackgroundTasks", targets: ["BackgroundTasks"])
1913
],

Examples/CDK/Package.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "APIGatewayLambda", targets: ["APIGatewayLambda"])
1913
],

Examples/HelloWorld/Package.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "MyLambda", targets: ["MyLambda"])
1913
],

Examples/S3_AWSSDK/Package.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "AWSSDKExample",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "AWSSDKExample", targets: ["AWSSDKExample"])
1913
],

Examples/S3_Soto/Package.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "SotoExample",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "SotoExample", targets: ["SotoExample"])
1913
],

Examples/Streaming/Package.swift

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ import PackageDescription
55
// needed for CI to test the local version of the library
66
import struct Foundation.URL
77

8-
#if os(macOS)
9-
let platforms: [PackageDescription.SupportedPlatform]? = [.macOS(.v15)]
10-
#else
11-
let platforms: [PackageDescription.SupportedPlatform]? = nil
12-
#endif
13-
148
let package = Package(
159
name: "swift-aws-lambda-runtime-example",
16-
platforms: platforms,
10+
platforms: [.macOS(.v15)],
1711
products: [
1812
.executable(name: "StreamingNumbers", targets: ["StreamingNumbers"])
1913
],

0 commit comments

Comments
 (0)