Skip to content

Commit a0bb3d7

Browse files
authored
feat(cli): add version flag to CLI (#49)
`actionbase --version` now prints the CLI version.
1 parent 74ebd8a commit a0bb3d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cli/cmd/actionbase/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"fmt"
45
"os"
56

67
"github.com/kakao/actionbase/internal/runner"
@@ -21,6 +22,11 @@ const (
2122
func main() {
2223
parser := util.ParseArgs(os.Args)
2324

25+
if _, found := parser.GetLenient("version"); found {
26+
fmt.Println("v" + Version)
27+
return
28+
}
29+
2430
host, found := parser.Get(hostParamKey)
2531
if !found {
2632
host = DefaultHost

0 commit comments

Comments
 (0)