-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (48 loc) · 2.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# VERSION defines the release-version of the bundle.
VERSION ?=
JAVA ?=
SPRING_BOOT ?=
define java_version
$(if $(filter-out "",$(JAVA)),-D'java.version=$(JAVA)',)
endef
define spring_boot_version
$(if $(filter-out "",$(SPRING_BOOT)),-D'spring-boot.version=$(SPRING_BOOT)',)
endef
##@ General
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
##@ Develop
format: ## Format the source code.
mvn validate -e
clean: ## Remove files generated at build-time.
mvn clean -e
compile: clean ## Clean and compile the source code.
mvn compile -e $(call java_version) $(call spring_boot_version)
test: clean ## Clean and test the compiled code.
mvn process-classes test -e $(call java_version) $(call spring_boot_version)
test-native: clean ## Clean and native test the compiled code.
mvn -PnativeTest process-classes test -e $(call java_version) $(call spring_boot_version)
install: clean ## Install project to local repository w/o unit testing.
mvn install -e -DskipTests -Prelease $(call java_version) $(call spring_boot_version)
spring-boot-version: ## Get current Spring Boot version
@mvn help:evaluate -Dexpression=spring-boot.version -DforceStdout -q
bump-spring-boot: ## Bump Spring Boot version
ifeq ($(strip $(BOOT)),)
$(error BOOT is required)
endif
mvn versions:set-property -Dproperty=spring-boot.version -DnewVersion=$(BOOT)
mvn versions:commit
bump-deps: ## Bump dependencies to the latest version.
mvn versions:update-properties -DexcludeProperties=spring-boot.version
mvn versions:commit
##@ Delivery
version: ## Get current project version
@mvn help:evaluate -Dexpression=project.version -DforceStdout -q
new-version: ## Update version.
ifeq ($(strip $(VERSION)),)
$(error VERSION is required)
endif
mvn versions:set -DnewVersion=$(VERSION)
mvn versions:commit
release: ## Pack w/o unit testing, and deploy to remote repository.
mvn clean deploy -e -Prelease -DskipTests