Merge pull request #204 from superseb/version

Fix version for cli
This commit is contained in:
Darren Shepherd 2019-03-20 11:49:59 -07:00 committed by GitHub
commit 78d75fb15b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,6 @@ cp -f ./bin/hyperkube dist/artifacts/hyperkube${BIN_SUFFIX}
CMD_NAME=dist/artifacts/k3s${BIN_SUFFIX}
go generate
LDFLAGS="-X github.com/rancher/k3s/version.Version=$VERSION -w -s"
LDFLAGS="-X github.com/rancher/k3s/pkg/version.Version=$VERSION -X github.com/rancher/k3s/pkg/version.GitCommit=${COMMIT:0:8} -w -s"
STATIC="-extldflags '-static'"
CGO_ENABLED=0 go build -ldflags "$LDFLAGS $STATIC" -o ${CMD_NAME} ./cmd/k3s/main.go