-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
76 lines (68 loc) · 1.58 KB
/
Copy pathmain.go
File metadata and controls
76 lines (68 loc) · 1.58 KB
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
69
70
71
72
73
74
75
76
package main
import (
"fmt"
"os"
"github.com/AxeForging/pipekit/actions"
"github.com/AxeForging/pipekit/helpers"
"github.com/urfave/cli"
)
// Version information - set during build
var (
Version = "dev"
BuildTime = "unknown"
GitCommit = "unknown"
)
func main() {
helpers.SetupLogger("info")
app := cli.NewApp()
app.Name = "pipekit"
app.Usage = "CI/CD pipeline Swiss Army knife"
app.Version = Version
app.Commands = []cli.Command{
actions.EnvCommand(),
actions.MaskCommand(),
actions.TransformCommand(),
actions.SummaryCommand(),
actions.AssertCommand(),
actions.MatrixCommand(),
actions.NotifyCommand(),
actions.WaitCommand(),
actions.DiffCommand(),
actions.VersionCommand(),
actions.RetryCommand(),
actions.CacheKeyCommand(),
actions.ChecksumCommand(),
actions.ArtifactCommand(),
actions.GitCommand(),
actions.ChangelogCommand(),
actions.ConfigCommand(),
actions.ParseCommand(),
actions.CommentCommand(),
actions.JSONCommand(),
actions.YAMLCommand(),
actions.RenderCommand(),
actions.ExecCommand(),
actions.URLCommand(),
actions.ImageCommand(),
actions.TimeCommand(),
actions.PortCommand(),
actions.UUIDCommand(),
actions.RandomCommand(),
actions.DoctorCommand(),
{
Name: "build-info",
Usage: "show build version information",
Action: func(c *cli.Context) error {
fmt.Printf("pipekit version %s\n", Version)
fmt.Printf("Build time: %s\n", BuildTime)
fmt.Printf("Git commit: %s\n", GitCommit)
return nil
},
},
}
err := app.Run(os.Args)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}