mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Use vendor prefix for versions if not using go mod
This commit is contained in:
parent
b680295922
commit
01707ce451
@ -8,13 +8,17 @@ PKG="github.com/rancher/k3s"
|
||||
PKG_CONTAINERD="github.com/containerd/containerd"
|
||||
PKG_RANCHER_CONTAINERD="github.com/rancher/containerd"
|
||||
PKG_CRICTL="github.com/kubernetes-sigs/cri-tools"
|
||||
VENDOR_PREFIX=
|
||||
if [ -z "$(go mod why 2>/dev/null)" ]; then
|
||||
VENDOR_PREFIX="${PKG}/vendor/"
|
||||
fi
|
||||
|
||||
VERSIONFLAGS="
|
||||
-X $PKG/pkg/version.Version=$VERSION
|
||||
-X $PKG/pkg/version.GitCommit=${COMMIT:0:8}
|
||||
-X $PKG_CONTAINERD/version.Version=$VERSION_CONTAINERD
|
||||
-X $PKG_CONTAINERD/version.Package=$PKG_RANCHER_CONTAINERD
|
||||
-X $PKG_CRICTL/pkg/version.Version=$VERSION_CRICTL"
|
||||
-X ${PKG}/pkg/version.Version=${VERSION}
|
||||
-X ${PKG}/pkg/version.GitCommit=${COMMIT:0:8}
|
||||
-X ${VENDOR_PREFIX}${PKG_CONTAINERD}/version.Version=${VERSION_CONTAINERD}
|
||||
-X ${VENDOR_PREFIX}${PKG_CONTAINERD}/version.Package=${PKG_RANCHER_CONTAINERD}
|
||||
-X ${VENDOR_PREFIX}${PKG_CRICTL}/pkg/version.Version=${VERSION_CRICTL}"
|
||||
LDFLAGS="
|
||||
-w -s"
|
||||
STATIC="
|
||||
|
Loading…
Reference in New Issue
Block a user