-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
Package.swift
68 lines (63 loc) · 2.9 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
56
57
58
59
60
61
62
63
64
65
66
67
68
// swift-tools-version:4.2
import PackageDescription
// Version number can be found in Source/Danger/Danger.swift
let package = Package(
name: "danger-swift",
products: [
.library(name: "Danger", type: .dynamic, targets: ["Danger"]),
.library(name: "DangerFixtures", type: .dynamic, targets: ["DangerFixtures"]),
.library(name: "DangerDeps", type: .dynamic, targets: ["Danger-Swift"]), // dev
.executable(name: "danger-swift", targets: ["Runner"]),
],
dependencies: [
.package(url: "https://github.com/shibapm/Logger", from: "0.1.0"),
.package(url: "https://github.com/JohnSundell/Marathon", from: "3.3.0"),
.package(url: "https://github.com/nerdishbynature/octokit.swift", from: "0.9.0"),
// Danger Plugins
// Dev dependencies
.package(url: "https://github.com/shibapm/Komondor", from: "1.0.0"), // dev
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.35.8"), // dev
.package(url: "https://github.com/Realm/SwiftLint", from: "0.28.1"), // dev
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.0.0"), // dev
.package(url: "https://github.com/shibapm/Rocket", from: "0.4.0"), // dev
.package(url: "https://github.com/jpsim/Yams.git", from: "1.0.0"), // dev
.package(url: "https://github.com/eneko/SourceDocs", from: "0.5.1"), // dev
],
targets: [
.target(name: "Danger-Swift", dependencies: ["Danger", "Yams"]), // dev
.target(name: "DangerShellExecutor"),
.target(name: "Danger", dependencies: ["OctoKit", "Logger", "DangerShellExecutor"]),
.target(name: "RunnerLib", dependencies: ["Logger", "DangerShellExecutor"]),
.target(name: "Runner", dependencies: ["RunnerLib", "MarathonCore", "Logger"]),
.target(name: "DangerFixtures", dependencies: ["Danger"]),
.testTarget(name: "DangerTests", dependencies: ["Danger", "DangerFixtures", "SnapshotTesting"]), // dev
.testTarget(name: "RunnerLibTests", dependencies: ["RunnerLib", "SnapshotTesting"]), // dev
]
)
#if canImport(PackageConfig)
import PackageConfig
let config = PackageConfiguration([
"komondor": [
"pre-push": "swift test",
"pre-commit": [
"swift test",
"swift test --generate-linuxmain",
"swift run swiftformat .",
"swift run swiftlint autocorrect --path Sources/",
"git add .",
],
],
"rocket": [
"before": [
"make docs",
"Scripts/update_makefile.sh",
"Scripts/update_danger_version.sh",
"Scripts/update_changelog.sh",
"Scripts/update_dockerfile.sh",
],
"after": [
"Scripts/create_homebrew_tap.sh",
],
],
]).write()
#endif