diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-03 16:05:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-03 16:05:34 -0800 |
commit | c4f6d5615a34ea67b1335a2a446bd09789d98015 (patch) | |
tree | 0b173607c4ebe075462762e78bbcf0d5e6580f74 /Makefile | |
parent | 234e8382e59c566330e023fd11f4b590aa1129da (diff) | |
parent | dbb9d098b5cb87f60debc4861dd15774257c9dbf (diff) | |
download | podman-c4f6d5615a34ea67b1335a2a446bd09789d98015.tar.gz podman-c4f6d5615a34ea67b1335a2a446bd09789d98015.tar.bz2 podman-c4f6d5615a34ea67b1335a2a446bd09789d98015.zip |
Merge pull request #5066 from cevich/fix_gate_wrong_commit
Cirrus: Fix gate task + make lint|validate
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -3,7 +3,7 @@ export GOPROXY=https://proxy.golang.org GO ?= go DESTDIR ?= -EPOCH_TEST_COMMIT ?= $(shell git merge-base HEAD $${DEST_BRANCH:-master}) +EPOCH_TEST_COMMIT ?= $(shell git merge-base $${DEST_BRANCH:-master} HEAD) HEAD ?= HEAD CHANGELOG_BASE ?= HEAD~ CHANGELOG_TARGET ?= HEAD @@ -132,6 +132,9 @@ for cmd in sorted(cmds): endef export PRINT_HELP_PYSCRIPT +# Dereference variable $(1), return value if non-empty, otherwise raise an error. +err_if_empty = $(if $(strip $($(1))),$(strip $($(1))),$(error Required variable $(1) value is undefined, whitespace, or empty)) + .PHONY: help help: @$(PYTHON) -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) @@ -146,6 +149,7 @@ endif .PHONY: lint lint: golangci-lint + @echo "Linting vs commit '$(call err_if_empty,EPOCH_TEST_COMMIT)'" ifeq ($(PRE_COMMIT),) @echo "FATAL: pre-commit was not found, check https://pre-commit.com/ about installing it." >&2 @exit 2 @@ -531,6 +535,7 @@ uninstall: .PHONY: .gitvalidation .gitvalidation: .gopathok + @echo "Validating vs commit '$(call err_if_empty,EPOCH_TEST_COMMIT)'" GIT_CHECK_EXCLUDE="./vendor:docs/make.bat" $(GOBIN)/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD) .PHONY: install.tools |