Skip to content

Commit

Permalink
Don't pull in the package by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Jun 26, 2024
1 parent 7812975 commit b2b79fc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/StanfordSpezi/SpeziFoundation", from: "1.0.2"),
.package(url: "https://github.com/StanfordBDHG/XCTRuntimeAssertions", from: "1.0.1"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.1"),
.package(url: "https://github.com/realm/SwiftLint.git", .upToNextMinor(from: "0.55.1"))
],
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.1")
] + swiftLintPackage(),
targets: [
.target(
name: "Spezi",
Expand Down Expand Up @@ -78,3 +77,11 @@ func swiftLintPlugin() -> [Target.PluginUsage] {
[]
}
}

func swiftLintPackage() -> [PackageDescription.Package.Dependency] {
if ProcessInfo.processInfo.environment["SPEZI_DEVELOPMENT_SWIFTLINT"] != nil {
[.package(url: "https://github.com/realm/SwiftLint.git", .upToNextMinor(from: "0.55.1"))]
} else {
[]
}
}

0 comments on commit b2b79fc

Please sign in to comment.