This doesn't really make sense now that this script returns a
$GITHUB_ENV snippet.
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
| ... | ... |
@@ -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")
|