-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.go
executable file
·49 lines (38 loc) · 1.17 KB
/
main.go
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
package main
import (
"log"
"os"
)
// Version is GDP's version.
const Version string = "v0.2.6"
// Usage is GDP's usage.
const Usage string = `gdp is a CLI tool for pushing the tag associated with deployment and publishing the release note in GitHub.
Usage:
gdp <command> [-t | --tag <TAG>] [-d | --dry-run] [-f | --force]
Available Commands:
deploy Add the tag to local repository and push the tag to remote(origin) repository
publish Create the release note in GitHub which based on the merge commits of the tag
Flags:
-d, --dry-run dry-run gdp
-t, --tag specify tag at semantic(e.g. v1.2.3 or 1.2.3) or date(e.g. 20180525.1 or release_20180525) format
-f, --force run gdp without validation
-h, --help help for gdp
-v, --version confirm gdp version
Example Usage:
gdp deploy -t TAG -d specify tag and dry-run
gdp publish -t TAG -f force(skipped validation)
gdp deploy/publish set tag automatically
Further Help:
https://github.com/Connehito/gdp`
func main() {
gdp, err := NewCommand()
if err != nil {
log.Fatal(err)
}
cli := &CLI{
outStream: os.Stdout,
errStream: os.Stderr,
gdp: gdp,
}
os.Exit(cli.Run(os.Args))
}