ci(buildkit): remove early-return from buildkit-ref

This doesn't really make sense now that this script returns a
$GITHUB_ENV snippet.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit 7310a7cd0c)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
This commit is contained in:
Bjorn Neergaard 2023-07-18 08:32:44 -06:00
parent a936ae7e98
commit ff0144de3b
No known key found for this signature in database

View file

@ -1,18 +1,12 @@
#!/usr/bin/env bash
# This script returns the current BuildKit ref and source repository being used.
# This script will only work with a BuildKit repository hosted on GitHub.
# If BUILDKIT_REF is already set in the environment, it will be returned as-is.
#
# The output of this script may be valid shell script, but is intended for use with
# GitHub Actions' $GITHUB_ENV.
buildkit_pkg=github.com/moby/buildkit
if [ -n "$BUILDKIT_REF" ]; then
echo "$BUILDKIT_REF"
exit 0
fi
# get buildkit version from vendor.mod
buildkit_ref=$(./hack/with-go-mod.sh go list -mod=mod -modfile=vendor.mod -u -m -f '{{if .Replace}}{{.Replace.Version}}{{else}}{{.Version}}{{end}}' "$buildkit_pkg")
buildkit_repo=$(./hack/with-go-mod.sh go list -mod=mod -modfile=vendor.mod -u -m -f '{{if .Replace}}{{.Replace.Path}}{{else}}{{.Path}}{{end}}' "$buildkit_pkg")