-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
52 lines (37 loc) · 1.47 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
# RELEASE defines the release-version fob the bundle.
VERSION ?=
# Functions
define java_version
$(if $(filter-out "",$(JAVA)),-D'java.version=$(JAVA)',)
endef
define spring_version
$(if $(filter-out "",$(SPRING)),-D'spring-boot.version=$(SPRING)',)
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
clean: ## Remove files generated at build-time.
mvn clean -e
compile: clean ## Clean and compile the source code.
mvn compile -e
test: clean ## Clean and test the compiled code.
mvn test -e $(call java_version) $(call spring_version)
install: clean ## Install project to local repository w/o unit testing.
mvn install -e -DskipTests -Prelease
bump-deps: ## Bump dependencies to the latest version (excluding Spring).
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: clean ## Pack w/o unit testing, and deploy to remote repository.
mvn deploy -e -DskipTests -Prelease