@@ -19,9 +19,14 @@ GOTEST_INTEGRATION = $(GOTEST) -parallel 1 -count 1 -tags=integration -ldflags "
19
19
20
20
OS := $(shell uname)
21
21
PREV_BUILD_PATH := build-prev
22
+ NEXT_BUILD_PATH := build-next
22
23
23
24
CURRENT_VERSION := $(shell git rev-parse --abbrev-ref HEAD)
25
+
26
+ # Latest non release candidate version
24
27
PREV_VERSION ?= $(shell git describe --abbrev=0 --tags --exclude "* -rc* ")
28
+ # Current commit
29
+ NEXT_VERSION ?= $(CURRENT_VERSION )
25
30
26
31
# Targets for integration testing
27
32
integration-clean-previous :
@@ -34,9 +39,15 @@ integration-build-previous: integration-clean-previous integration-prepare-build
34
39
git checkout -q $(CURRENT_VERSION )
35
40
echo " Built version $( PREV_VERSION) "
36
41
37
- integration-clean-current : clean
38
- integration-build-current : integration-clean-current build docker-build
39
- echo " Built current version"
42
+ integration-clean-current :
43
+ rm -rf $(NEXT_BUILD_PATH )
44
+ $(GOCLEAN ) .
45
+ integration-prepare-build-current :
46
+ git checkout -q $(NEXT_VERSION )
47
+ $(eval BUILD_PATH = $(NEXT_BUILD_PATH ) )
48
+ integration-build-current : integration-clean-current integration-prepare-build-current build docker-build
49
+ git checkout -q $(CURRENT_VERSION )
50
+ echo " Built version $( NEXT_VERSION) "
40
51
41
52
integration-build-all :
42
53
$(MAKE ) integration-build-current
0 commit comments