We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 505abff commit ccda77cCopy full SHA for ccda77c
cmd/anka-cloud-gitlab-executor/main.go
@@ -3,13 +3,15 @@ package main
3
import (
4
"context"
5
"errors"
6
+ "fmt"
7
"os"
8
"os/signal"
9
"syscall"
10
11
"github.com/veertuinc/anka-cloud-gitlab-executor/internal/command"
12
"github.com/veertuinc/anka-cloud-gitlab-executor/internal/gitlab"
13
"github.com/veertuinc/anka-cloud-gitlab-executor/internal/log"
14
+ "github.com/veertuinc/anka-cloud-gitlab-executor/internal/version"
15
)
16
17
var (
@@ -27,6 +29,12 @@ func main() {
27
29
}
28
30
31
func run() int {
32
+
33
+ if len(os.Args) > 1 && os.Args[1] == "--version" {
34
+ fmt.Printf("%s", version.Get())
35
+ return 0
36
+ }
37
38
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGTERM)
39
defer stop()
40
0 commit comments