-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
mvn_opts= | ||
mvn_cmd=mvn $(mvn_opts) | ||
|
||
default: help | ||
|
||
.PHONY: build | ||
## Build the project | ||
build: | ||
$(mvn_cmd) clean install | ||
|
||
.PHONY: quick-build | ||
## Perform a quick build of the project | ||
quick-build: | ||
$(mvn_cmd) clean install -Dquickly | ||
|
||
.PHONY: test | ||
## Launch full testing | ||
test: | ||
$(mvn_cmd) clean verify | ||
|
||
.PHONY: quick-test | ||
## Launch unit testing | ||
quick-test: | ||
$(mvn_cmd) clean verify -DquickTests | ||
|
||
.PHONY: deploy | ||
## Deploy the project | ||
deploy: | ||
$(mvn_cmd) deploy | ||
|
||
.PHONY: clean | ||
## Clean the project | ||
clean: | ||
$(mvn_cmd) clean | ||
|
||
.PHONY: mvn | ||
## Execute a Maven command with project configuration. Needs the `cmd` argument set | ||
mvn: | ||
$(mvn_cmd) ${cmd} | ||
|
||
## Update the quarkus version. Needs the `quarkus_version` argument set | ||
update-quarkus: | ||
export BUILD_MVN_OPTS=${mvn_opts} && .ci/environments/common/update_quarkus.sh ${quarkus_version} | ||
$(MAKE) show-diff | ||
|
||
## Prepare the repository for a specific environment. Needs the `environment` argument set | ||
prepare-env: | ||
export BUILD_MVN_OPTS=${mvn_opts} && .ci/environments/update.sh ${environment} | ||
|
||
## Show project dependencies | ||
tree: | ||
$(mvn_cmd) dependency:tree | ||
|
||
## Show Git diff | ||
show-diff: | ||
git status | ||
git diff | ||
|
||
## This help screen | ||
help: | ||
@printf "Available targets:\n\n" | ||
@awk '/^[a-zA-Z\-_0-9%:\\]+/ { \ | ||
helpMessage = match(lastLine, /^## (.*)/); \ | ||
if (helpMessage) { \ | ||
helpCommand = $$1; \ | ||
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ | ||
gsub("\\\\", "", helpCommand); \ | ||
gsub(":+$$", "", helpCommand); \ | ||
printf " \x1b[32;01m%-35s\x1b[0m %s\n", helpCommand, helpMessage; \ | ||
} \ | ||
} \ | ||
{ lastLine = $$0 }' $(MAKEFILE_LIST) | ||
@printf "\n" | ||
@printf "All Maven commands can include some maven options via the \`mvn_opts\` argument !" | ||
@printf "\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters