mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #38677 from tiborvass/fix-validate
hack: no need to git fetch in CI
This commit is contained in:
commit
6800954050
2 changed files with 7 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -15,6 +15,7 @@ export DOCKER_GITCOMMIT
|
||||||
# against these are used in hack/validate/.validate to check what changed in the PR.
|
# against these are used in hack/validate/.validate to check what changed in the PR.
|
||||||
export VALIDATE_REPO
|
export VALIDATE_REPO
|
||||||
export VALIDATE_BRANCH
|
export VALIDATE_BRANCH
|
||||||
|
export VALIDATE_ORIGIN_BRANCH
|
||||||
|
|
||||||
# env vars passed through directly to Docker's build scripts
|
# env vars passed through directly to Docker's build scripts
|
||||||
# to allow things like `make KEEPBUNDLE=1 binary` easily
|
# to allow things like `make KEEPBUNDLE=1 binary` easily
|
||||||
|
@ -54,6 +55,7 @@ DOCKER_ENVS := \
|
||||||
-e TIMEOUT \
|
-e TIMEOUT \
|
||||||
-e VALIDATE_REPO \
|
-e VALIDATE_REPO \
|
||||||
-e VALIDATE_BRANCH \
|
-e VALIDATE_BRANCH \
|
||||||
|
-e VALIDATE_ORIGIN_BRANCH \
|
||||||
-e HTTP_PROXY \
|
-e HTTP_PROXY \
|
||||||
-e HTTPS_PROXY \
|
-e HTTPS_PROXY \
|
||||||
-e NO_PROXY \
|
-e NO_PROXY \
|
||||||
|
|
|
@ -11,8 +11,11 @@ if [ -z "$VALIDATE_UPSTREAM" ]; then
|
||||||
|
|
||||||
VALIDATE_HEAD="$(git rev-parse --verify HEAD)"
|
VALIDATE_HEAD="$(git rev-parse --verify HEAD)"
|
||||||
|
|
||||||
|
if [ -z "$VALIDATE_ORIGIN_BRANCH" ]; then
|
||||||
git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH"
|
git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH"
|
||||||
VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)"
|
VALIDATE_ORIGIN_BRANCH=FETCH_HEAD
|
||||||
|
fi
|
||||||
|
VALIDATE_UPSTREAM="$(git rev-parse --verify $VALIDATE_ORIGIN_BRANCH)"
|
||||||
|
|
||||||
VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD"
|
VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD"
|
||||||
VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD"
|
VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD"
|
||||||
|
|
Loading…
Reference in a new issue