@@ -18,10 +18,16 @@ $(MAKEFILE):
18
18
GOTEST_INTEGRATION = $(GOTEST ) -parallel 1 -count 1 -tags=integration -ldflags "$(LD_FLAGS ) "
19
19
20
20
OS := $(shell uname)
21
+ CURRENT_BUILD_PATH := $(BUILD_PATH )
21
22
PREV_BUILD_PATH := build-prev
23
+ NEXT_BUILD_PATH := build-next
22
24
23
- CURRENT_VERSION := $(shell git rev-parse --abbrev-ref HEAD)
25
+ CURRENT_VERSION := $(shell git rev-parse HEAD)
26
+
27
+ # Latest non release candidate version
24
28
PREV_VERSION ?= $(shell git describe --abbrev=0 --tags --exclude "* -rc* ")
29
+ # Current commit
30
+ NEXT_VERSION ?= $(CURRENT_VERSION )
25
31
26
32
# Targets for integration testing
27
33
integration-clean-previous :
@@ -34,12 +40,29 @@ integration-build-previous: integration-clean-previous integration-prepare-build
34
40
git checkout -q $(CURRENT_VERSION )
35
41
echo " Built version $( PREV_VERSION) "
36
42
37
- integration-clean-current : clean
38
- integration-build-current : integration-clean-current build docker-build
39
- echo " Built current version"
43
+ integration-clean-next :
44
+ rm -rf $(NEXT_BUILD_PATH )
45
+ $(GOCLEAN ) .
46
+ integration-prepare-build-next :
47
+ git checkout -q $(NEXT_VERSION )
48
+ $(eval BUILD_PATH = $(NEXT_BUILD_PATH ) )
49
+ integration-build-next : integration-clean-next integration-prepare-build-next build docker-build
50
+ git checkout -q $(CURRENT_VERSION )
51
+ echo " Built version $( NEXT_VERSION) "
52
+
53
+ integration-clean-current :
54
+ rm -rf $(CURRENT_BUILD_PATH )
55
+ $(GOCLEAN ) .
56
+ integration-prepare-build-current :
57
+ git checkout -q $(CURRENT_VERSION )
58
+ $(eval BUILD_PATH = $(CURRENT_BUILD_PATH ) )
59
+ integration-build-current : integration-clean-current integration-prepare-build-current build docker-build
60
+ git checkout -q $(CURRENT_VERSION )
61
+ echo " Built version $( CURRENT_VERSION) "
40
62
41
63
integration-build-all :
42
64
$(MAKE ) integration-build-current
65
+ $(MAKE ) integration-build-next
43
66
$(MAKE ) integration-build-previous
44
67
45
68
ifeq ($(OS ) ,Darwin)
0 commit comments