From 98c5d9d9624f82c5525558bf699642a929b229e4 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 12 Dec 2018 13:57:18 +0100 Subject: Makefile: validate that each commit can at least build it is very useful when using git bisect that at least the commit can build. got inspiration from: https://twitter.com/pid_eins/status/1072797993760423941 Signed-off-by: Giuseppe Scrivano --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 250226cf0..1f24e32ea 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ HEAD ?= HEAD CHANGELOG_BASE ?= HEAD~ CHANGELOG_TARGET ?= HEAD PROJECT := github.com/containers/libpod +GIT_BASE_BRANCH ?= origin/master GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) GIT_BRANCH_CLEAN ?= $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g") LIBPOD_IMAGE ?= libpod_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN)) @@ -345,6 +346,10 @@ API.md: cmd/podman/varlink/io.podman.varlink validate: gofmt .gitvalidation +build-all-new-commits: + # Validate that all the commits build on top of $(GIT_BASE_BRANCH) + git rebase $(GIT_BASE_BRANCH) -x make + .PHONY: \ .gopathok \ binaries \ -- cgit v1.2.3-54-g00ecf