Closed puneetguptanitj closed 6 years ago
Allow version to be overridden by env variable
$ VERSION_OVERRIDE=10.20.30-alpha make cctl go build -o cctl -ldflags "-X github.com/platform9/cctl/vendor/k8s.io/kubernetes/pkg/version.buildDate=2018-08-02T21:29:36Z -X github.com/platform9/cctl/vendor/k8s.io/kubernetes/pkg/version.gitCommit=b5f52bc60a85346aa732c063448be2dbdc00582f -X github.com/platform9/cctl/vendor/k8s.io/kubernetes/pkg/version.gitTreeState=dirty -X github.com/platform9/cctl/vendor/k8s.io/kubernetes/pkg/version.gitVersion=10.20.30-alpha-dirty" $ ./cctl version --output json { "clientVersion": { "major": "", "minor": "", "gitVersion": "10.20.30-alpha-dirty", "gitCommit": "b5f52bc60a85346aa732c063448be2dbdc00582f", "gitTreeState": "dirty", "buildDate": "2018-08-02T21:29:36Z", "goVersion": "go1.9.1", "compiler": "gc", "platform": "linux/amd64" } }
Allow version to be overridden by env variable