|
2 | 2 | help: |
3 | 3 | @cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t |
4 | 4 |
|
5 | | -## build-release - Build the project for release |
6 | | -# @parameters: |
7 | | -# pass= - The GPG password to sign the release |
8 | | -build-release: |
9 | | - mvn clean install -Dgpg.passphrase=${pass} |
10 | | - |
11 | | -## build-dev - Build the project for development |
12 | | -build-dev: |
| 5 | +## build - Builds the project for development |
| 6 | +build: |
13 | 7 | mvn clean install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true |
14 | 8 |
|
15 | | -## publish - Publish a release of the project |
16 | | -# @parameters: |
17 | | -# pass= - The GPG password to sign the release |
18 | | -publish: |
19 | | - mvn clean deploy -Dgpg.passphrase=${pass} |
20 | | - |
21 | | -## test - Test the project |
22 | | -test: |
23 | | - mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true |
24 | | - |
25 | | -## clean - Clean the project |
| 9 | +## clean - Cleans the project |
26 | 10 | clean: |
27 | 11 | mvn clean |
28 | 12 |
|
29 | | -# install-checkstyle - Install CheckStyle |
| 13 | +## coverage - Test the project and generate a coverage report |
| 14 | +coverage: |
| 15 | + mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true jacoco:report |
| 16 | + |
| 17 | +## install-checkstyle - Install CheckStyle |
30 | 18 | install-checkstyle: |
31 | 19 | wget -O checkstyle.jar -q https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.3.1/checkstyle-10.3.1-all.jar |
32 | 20 |
|
33 | 21 | ## lint - Check if project follows CheckStyle rules (must run install-checkstyle first) |
34 | 22 | lint: |
35 | 23 | java -jar checkstyle.jar src -c easypost_java_style.xml -d |
36 | 24 |
|
| 25 | +## publish - Publish a release of the project |
| 26 | +# @parameters: |
| 27 | +# pass= - The GPG password to sign the release |
| 28 | +publish: |
| 29 | + mvn clean deploy -Dgpg.passphrase=${pass} |
| 30 | + |
| 31 | +## publish-dry - Build the project as a dry run to publishing |
| 32 | +# @parameters: |
| 33 | +# pass= - The GPG password to sign the release |
| 34 | +publish-dry: |
| 35 | + mvn clean install -Dgpg.passphrase=${pass} |
| 36 | + |
| 37 | +## release - Cuts a release for the project on GitHub (requires GitHub CLI) |
| 38 | +# tag = The associated tag title of the release |
| 39 | +release: |
| 40 | + gh release create ${tag} target/*.jar target/*.asc target/*.pom |
| 41 | + |
37 | 42 | ## scan - Scan the project for serious security issues |
38 | 43 | scan: |
39 | | - mvn verify -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Djavadoc.skip=true -Ddependency-check.failBuildOnCVSS=7 -Ddependency-check.junitFailOnCVSS=7 |
40 | | - |
41 | | -## scan-strict - Scan the project for any security issues (strict mode) |
42 | | -scan-strict: |
43 | 44 | mvn verify -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Djavadoc.skip=true -Ddependency-check.failBuildOnCVSS=0 -Ddependency-check.junitFailOnCVSS=0 |
44 | 45 |
|
45 | | -.PHONY: help build-release build-dev publish test clean install-checkstyle lint scan scan-strict |
| 46 | +## test - Test the project |
| 47 | +test: |
| 48 | + mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true |
| 49 | + |
| 50 | +.PHONY: help build clean install-checkstyle lint publish publish-dry release scan scan-strict test |
0 commit comments