forked from github/multus-cni
Fix version string in '-v' option
Due to change the file layout, previous version command does not work. This change fix it.
This commit is contained in:
@@ -18,6 +18,8 @@ builds:
|
|||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
- s390x
|
- s390x
|
||||||
|
ldflags:
|
||||||
|
- -X gopkg.in/k8snetworkplumbingwg/multus-cni.v3/pkg/multus.version={{ .Tag }} -X gopkg.in/k8snetworkplumbingwg/multus-cni.v3/pkg/multus.commit={{ .Commit }} -X gopkg.in/k8snetworkplumbingwg/multus-cni.v3/pkg/multus.date={{ .Date }}
|
||||||
archives:
|
archives:
|
||||||
- wrap_in_directory: true
|
- wrap_in_directory: true
|
||||||
checksum:
|
checksum:
|
||||||
|
@@ -21,7 +21,7 @@ if [ -z "$VERSION" ]; then
|
|||||||
fi
|
fi
|
||||||
DATE=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --iso-8601=seconds)
|
DATE=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --iso-8601=seconds)
|
||||||
COMMIT=${COMMIT:-$(git rev-parse --verify HEAD)}
|
COMMIT=${COMMIT:-$(git rev-parse --verify HEAD)}
|
||||||
LDFLAGS="-X main.version=${VERSION:-master} -X main.commit=${COMMIT} -X main.date=${DATE}"
|
LDFLAGS="-X gopkg.in/k8snetworkplumbingwg/multus-cni.v3/pkg/multus.version=${VERSION:-master} -X gopkg.in/k8snetworkplumbingwg/multus-cni.v3/pkg/multus.commit=${COMMIT} -X gopkg.in/k8snetworkplumbingwg/multus-cni.v3/pkg/multus.date=${DATE}"
|
||||||
export CGO_ENABLED=0
|
export CGO_ENABLED=0
|
||||||
|
|
||||||
# this if... will be removed when gomodules goes default
|
# this if... will be removed when gomodules goes default
|
||||||
|
Reference in New Issue
Block a user