Browse code

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>

Bjorn Neergaard authored on 2023/07/18 23:32:44
Showing 1 changed files
... ...
@@ -1,18 +1,12 @@
1 1
 #!/usr/bin/env bash
2 2
 # This script returns the current BuildKit ref and source repository being used.
3 3
 # This script will only work with a BuildKit repository hosted on GitHub.
4
-# If BUILDKIT_REF is already set in the environment, it will be returned as-is.
5 4
 #
6 5
 # The output of this script may be valid shell script, but is intended for use with
7 6
 # GitHub Actions' $GITHUB_ENV.
8 7
 
9 8
 buildkit_pkg=github.com/moby/buildkit
10 9
 
11
-if [ -n "$BUILDKIT_REF" ]; then
12
-	echo "$BUILDKIT_REF"
13
-	exit 0
14
-fi
15
-
16 10
 # get buildkit version from vendor.mod
17 11
 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")
18 12
 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")