You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/GitBuddyCore/Commands/ReleaseCommand.swift
+31-6Lines changed: 31 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,14 @@
5
5
// Created by Antoine van der Lee on 09/04/2020.
6
6
//
7
7
8
-
import Foundation
9
8
import ArgumentParser
9
+
import Foundation
10
10
11
11
structReleaseCommand:ParsableCommand{
12
-
13
-
publicstaticletconfiguration=CommandConfiguration(commandName:"release", abstract:"Create a new release including a changelog and publish comments on related issues.")
@Option(name:.shortAndLong, help:"Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually main).")
27
+
@Option(
28
+
name:.shortAndLong,
29
+
help:"""
30
+
Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA.
31
+
Unused if the Git tag already exists.
32
+
33
+
Default: the repository's default branch (usually main).
34
+
"""
35
+
)
26
36
vartargetCommitish:String?
27
37
28
38
// 1.3.1b1072
29
-
@Option(name:[.long,.customShort("n")], help:"The name of the tag. If set, `changelogToTag` is required too. Default: takes the last created tag to publish as a GitHub release.")
39
+
@Option(
40
+
name:[.long,.customShort("n")],
41
+
help:"""
42
+
The name of the tag. If set, `changelogToTag` is required too.
43
+
44
+
Default: takes the last created tag to publish as a GitHub release.
@Option(name:.shortAndLong, help:"The last release tag to use as a base for the changelog creation. Default: previous tag.")
38
55
varlastReleaseTag:String?
39
56
40
-
@Option(name:.customLong("changelogToTag"), help:"If set, the date of this tag will be used as the limit for the changelog creation. This variable should be passed when `tagName` is set. Default: latest tag.")
57
+
@Option(
58
+
name:.customLong("changelogToTag"),
59
+
help:"""
60
+
If set, the date of this tag will be used as the limit for the changelog creation.
61
+
This variable should be passed when `tagName` is set.
varbody="The pull request #\(pullRequestID) that closed this issue was merged and released as part of [Release \(release.title)](\(release.url)) :rocket:\n"
22
-
body +="Please let us know if the functionality works as expected as a reply here. If it does not, please open a new issue. Thanks!"
21
+
varbody="The pull request #\(pullRequestID) that closed this issue was merged and released "
22
+
body +="as part of [Release \(release.title)](\(release.url)) :rocket:\n"
23
+
body +="Please let us know if the functionality works as expected as a reply here. "
24
+
body +="If it does not, please open a new issue. Thanks!"
23
25
return body
24
26
}
25
27
}
@@ -43,14 +45,17 @@ enum Commenter {
43
45
staticfunc post(_ comment:Comment, on issueID:Int, at project:GITProject, completion:@escaping()->Void){
0 commit comments