-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
55 lines (51 loc) · 1.96 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// swift-tools-version:5.4
import PackageDescription
let package = Package(
name: "DangerSwiftCommitLint",
products: [
.library(name: "DangerSwiftCommitLint", targets: ["DangerSwiftCommitLint"]),
.library(name: "DangerDeps", type: .dynamic, targets: ["DangerDependencies"]), // dev
],
dependencies: [
.package(name: "danger-swift", url: "https://github.com/danger/swift", from: "3.0.0"),
// Dev dependencies.
.package(name: "DangerSwiftCoverage", url: "https://github.com/f-meloni/danger-swift-coverage", .upToNextMajor(from: "1.2.1")), // dev
.package(url: "https://github.com/shibapm/Komondor", from: "1.0.0"), // dev
.package(url: "https://github.com/shibapm/Rocket", from: "1.2.0"), // dev
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.48.0"), // dev
.package(url: "https://github.com/realm/SwiftLint", from: "0.43.0"), // dev
],
targets: [
.target( // dev
name: "DangerDependencies", // dev
dependencies: [ // dev
.product(name: "Danger", package: "danger-swift"), // dev
"DangerSwiftCoverage", // dev
"DangerSwiftCommitLint", // dev
] // dev
), // dev
.target(name: "DangerSwiftCommitLint", dependencies: [.product(name: "Danger", package: "danger-swift")]),
.testTarget(
name: "DangerSwiftCommitLintTests",
dependencies: ["DangerSwiftCommitLint"]
),
]
)
#if canImport(PackageConfig)
import PackageConfig
let config = PackageConfiguration([
"komondor": [
"pre-commit": [
"swift test --generate-linuxmain",
"swift run swiftformat .",
"swift run swiftlint autocorrect --path Sources/",
"git add .",
],
],
"rocket": [
"after": [
"push",
],
],
]).write()
#endif