Skip to content

Commit

Permalink
Update Package.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Dec 18, 2024
1 parent c2f7a4f commit 358471d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ let package = Package(
.library(name: "SotoXRay", targets: ["SotoXRay"]),
],
dependencies: [
.package(url: "https://github.com/soto-project/soto-core.git", branch: "main")
.package(url: "https://github.com/soto-project/soto-core.git", from: "7.3.0")
],
targets: [
.target(
Expand Down
31 changes: 23 additions & 8 deletions scripts/templates/generate-package/Package.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import PackageDescription

let swiftSettings: [SwiftSetting] = [
.enableExperimentalFeature("StrictConcurrency=complete"),
.enableExperimentalFeature("StrictConcurrency=complete")
]

let package = Package(
Expand All @@ -30,33 +30,48 @@ let package = Package(
],
products: [
{{#targets}}
.library(name: "Soto{{name}}", targets: ["Soto{{name}}"]){{^last()}},{{/last()}}
.library(name: "Soto{{name}}", targets: ["Soto{{name}}"]),
{{/targets}}
],
dependencies: [
.package(url: "https://github.com/soto-project/soto-core.git", from: "7.2.0")
.package(url: "https://github.com/soto-project/soto-core.git", from: "7.3.0")
],
targets: [
{{#targets}}
{{#hasExtension}}
.target(name: "_Soto{{name}}Generated", dependencies: [{{#dependencies}}{{.}}{{^last()}}, {{/last()}}{{/dependencies}}], path: "./Sources/Soto/Services/{{name}}", swiftSettings: swiftSettings){{^last()}},{{/last()}}
.target(
name: "_Soto{{name}}Generated",
dependencies: [{{#dependencies}}{{.}}{{^last()}}, {{/last()}}{{/dependencies}}],
path: "./Sources/Soto/Services/{{name}}",
swiftSettings: swiftSettings
),
{{/hasExtension}}
{{^hasExtension}}
.target(name: "Soto{{name}}", dependencies: [{{#dependencies}}{{.}}{{^last()}}, {{/last()}}{{/dependencies}}], path: "./Sources/Soto/Services/{{name}}", swiftSettings: swiftSettings),
.target(
name: "Soto{{name}}",
dependencies: [{{#dependencies}}{{.}}{{^last()}}, {{/last()}}{{/dependencies}}],
path: "./Sources/Soto/Services/{{name}}",
swiftSettings: swiftSettings
),
{{/hasExtension}}
{{/targets}}
// Service extensions
{{#extensionTargets}}
.target(name: "Soto{{name}}", dependencies: [{{#dependencies}}{{.}}, {{/dependencies}}"_Soto{{name}}Generated"], path: "./Sources/Soto/Extensions/{{name}}", swiftSettings: swiftSettings),
.target(
name: "Soto{{name}}",
dependencies: [{{#dependencies}}{{.}}, {{/dependencies}}"_Soto{{name}}Generated"],
path: "./Sources/Soto/Extensions/{{name}}",
swiftSettings: swiftSettings
),
{{/extensionTargets}}

.testTarget(
name: "SotoTests",
dependencies: [
{{#testTargets}}
"Soto{{.}}"{{^last()}},{{/last()}}
"Soto{{.}}",
{{/testTargets}}
]
)
),
]
)

0 comments on commit 358471d

Please sign in to comment.