Skip to content

Commit e115d98

Browse files
Release Package.swift for v2.0.5
- Production Package.swift with binary targets - Updated binary target URL for v2.0.5 - Updated checksum: 9d90d5b96a082536e0e873ecfa0eb77ac1d4628c5138de7b63172a0b59739a83 🤖 Automated release commit
1 parent 0c7a61b commit e115d98

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

Package.swift

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
// swift-tools-version: 6.1
22
import PackageDescription
33

4+
// Conditional plugin dependencies based on platform
5+
let swiftDependencyAuditPluginDependencies: [Target.Dependency]
6+
7+
#if os(macOS)
8+
swiftDependencyAuditPluginDependencies = [.target(name: "SwiftDependencyAuditBinary")]
9+
#else
10+
swiftDependencyAuditPluginDependencies = [.target(name: "SwiftDependencyAudit")]
11+
#endif
12+
413
let package = Package(
514
name: "SwiftDependencyAudit",
615
platforms: [
@@ -15,16 +24,11 @@ let package = Package(
1524
.plugin(name: "DependencyAuditPlugin", targets: ["DependencyAuditPlugin"]),
1625
],
1726
dependencies: [
18-
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.6.1"),
19-
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "601.0.1"),
27+
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.6.1")
2028
],
2129
targets: [
2230
.target(
2331
name: "SwiftDependencyAuditLib",
24-
dependencies: [
25-
.product(name: "SwiftSyntax", package: "swift-syntax"),
26-
.product(name: "SwiftParser", package: "swift-syntax"),
27-
],
2832
plugins: ["VersionPlugin"]
2933
),
3034
.executableTarget(
@@ -42,13 +46,12 @@ let package = Package(
4246
),
4347
.testTarget(
4448
name: "SwiftDependencyAuditTests",
45-
dependencies: ["SwiftDependencyAuditLib"],
46-
resources: [.copy("Fixtures")]
49+
dependencies: ["SwiftDependencyAuditLib"]
4750
),
4851
.plugin(
4952
name: "DependencyAuditPlugin",
5053
capability: .buildTool(),
51-
dependencies: ["SwiftDependencyAudit"]
54+
dependencies: swiftDependencyAuditPluginDependencies
5255
),
5356
.plugin(
5457
name: "VersionPlugin",
@@ -57,3 +60,15 @@ let package = Package(
5760
),
5861
]
5962
)
63+
64+
// Conditionally add binary target only on macOS
65+
#if os(macOS)
66+
package.targets.append(
67+
.binaryTarget(
68+
name: "SwiftDependencyAuditBinary",
69+
url:
70+
"https://github.com/tonyarnold/swift-dependency-audit/releases/download/v2.0.5/swift-dependency-audit.artifactbundle.zip",
71+
checksum: "9d90d5b96a082536e0e873ecfa0eb77ac1d4628c5138de7b63172a0b59739a83"
72+
)
73+
)
74+
#endif

0 commit comments

Comments
 (0)