#!/usr/bin/env sh

set -ex
export "COMMIT"="1d8dde89b8aba914e05e45366770736fea1fd690"
export "REVISION"="3"
export "VERSION"="0.36.1"

(
set -u

cd buildx
go build -mod=vendor \
  -ldflags "-X github.com/docker/buildx/version.Version=${VERSION}-${REVISION} -X github.com/docker/buildx/version.Revision=${COMMIT} -X github.com/docker/buildx/version.Package=github.com/docker/buildx" \
  -o docker-buildx \
  ./cmd/buildx

)
