Verified Commit 7479ba3f authored by Tomasz Maczukin's avatar Tomasz Maczukin
Browse files

Fix version information

parent 4f27f070
Pipeline #113370246 passed with stage
in 1 minute and 13 seconds
......@@ -11,10 +11,10 @@ gox ?= $(GOPATH)/bin/gox
PKG := $(shell go list .)
PKGs := $(shell go list ./... | grep -vE "^/vendor/")
GO_LDFLAGS := -X $(PKG).VERSION=$(VERSION) \
-X $(PKG).REVISION=$(REVISION) \
-X $(PKG).BRANCH=$(BRANCH) \
-X $(PKG).BUILT=$(BUILT) \
GO_LDFLAGS := -X $(PKG)/version.VERSION=$(VERSION) \
-X $(PKG)/version.REVISION=$(REVISION) \
-X $(PKG)/version.BRANCH=$(BRANCH) \
-X $(PKG)/version.BUILT=$(BUILT) \
-s -w
.PHONY: version_info
......
......@@ -6,6 +6,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"gitlab.com/gitlab-org/ci-cd/runner-tools/tlsctl/version"
)
func main() {
......@@ -13,10 +15,10 @@ func main() {
app.Name = "tlsctl"
app.Usage = "Set of commands to debug TLS certificates for GitLab Runner."
app.Description = "Set of commands to debug TLS certificates for GitLab Runner."
app.Version = Version().ShortLine()
app.Version = version.Version().ShortLine()
cli.VersionPrinter = func(_ *cli.Context) {
fmt.Print(Version().Extended())
fmt.Print(version.Version().Extended())
}
app.Commands = []cli.Command{
......
package main
package version
import (
"fmt"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment