-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPackage.swift
64 lines (63 loc) · 2.11 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
// swift-tools-version: 5.7
import PackageDescription
let package = Package(
name: "SourceCodeUtilityPlugins",
products: [
.plugin(
name: "Reformat Source Code",
targets: [
"Reformat Source Code"
]
),
.plugin(
name: "Regenerate Contributors List",
targets: [
"Regenerate Contributors List"
]
),
.plugin(
name: "Update Copyright Dates",
targets: [
"Update Copyright Dates"
]
),
],
dependencies: [
.package(
url: "https://github.com/nicklockwood/SwiftFormat",
branch: "0.48.0"
),
],
targets: [
.plugin(
name: "Reformat Source Code",
capability: .command(
intent: .custom(verb: "reformat-source-code", description: "Reformats the Swift source code files using SwiftFormat"),
permissions: [
.writeToPackageDirectory(reason: "This command reformats the Swift source files")
]
),
dependencies: [
.product(name: "swiftformat", package: "SwiftFormat"),
]
),
.plugin(
name: "Regenerate Contributors List",
capability: .command(
intent: .custom(verb: "regenerate-contributors-list", description: "Generates the CONTRIBUTORS.txt file based on Git logs"),
permissions: [
.writeToPackageDirectory(reason: "This command write the new copyright dates to the Swift source files")
]
)
),
.plugin(
name: "Update Copyright Dates",
capability: .command(
intent: .custom(verb: "update-copyright-dates", description: "Updates the copyright dates in source files based on Git logs"),
permissions: [
.writeToPackageDirectory(reason: "This command write the new copyright dates to the Swift source files")
]
)
),
]
)