Skip to content

Commit

Permalink
[ENGINE-978] Change revision scheme per ENGINE-970 requirements
Browse files Browse the repository at this point in the history
Signed-off-by: plaurent <[email protected]>
  • Loading branch information
psaintlaurent committed Aug 28, 2024
1 parent ae0a5e4 commit 215f6e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/build
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ set -e
: "${PACKAGE=github.com/docker/buildx}"
: "${VERSION=$(./hack/git-meta version)}"
: "${REVISION=$(./hack/git-meta revision)}"
: "${PRERELEASE=$(./hack/git-meta version | rev | cut -c3- | rev | cut -d'-' -f 2 | grep -E '(^tp|^rc).*')}"
: "${REVISION_NUMBER=1}"
VERSION=$(printf "v%sm%s%s" "$(./hack/git-meta version | rev | cut -c3- | rev | cut -d'-' -f 1 | cut -c2-)" "${REVISION_NUMBER}" "-${PRERELEASE}")

: "${CGO_ENABLED=0}"
: "${GO_PKG=github.com/docker/buildx}"
: "${GO_EXTRA_FLAGS=}"
: "${GO_LDFLAGS=-X ${GO_PKG}/version.Version=${VERSION} -X ${GO_PKG}/version.Revision=${REVISION} -X ${GO_PKG}/version.Package=${PACKAGE}}"
: "${GO_EXTRA_LDFLAGS=}"


set -x
CGO_ENABLED=$CGO_ENABLED go build -mod vendor -trimpath ${GO_EXTRA_FLAGS} -ldflags "${GO_LDFLAGS} ${GO_EXTRA_LDFLAGS}" -o "${DESTDIR}/docker-buildx" ./cmd/buildx

0 comments on commit 215f6e8

Please sign in to comment.