-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (44 loc) · 2.14 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
## help - Display help about make targets for this Makefile
help:
@cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t
## build - Builds the project for development
build:
mvn clean install -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true
## clean - Cleans the project
clean:
mvn clean
## coverage - Test the project and generate a coverage report
coverage:
mvn --batch-mode install -Dgpg.skip=true -Dcheckstyle.skip=true -Dcheckstyle.skip=true -Ddependency-check.skip=true -Djavadoc.skip=true jacoco:report
## install-checkstyle - Install CheckStyle
install-checkstyle:
curl -LJs https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.3.1/checkstyle-10.3.1-all.jar -o checkstyle.jar
curl -LJs https://raw.githubusercontent.com/EasyPost/examples/refs/heads/master/style_guides/java/easypost_java_style.xml -o easypost_java_style.xml
## install - Install requirements
install: | install-checkstyle
git submodule init
git submodule update
## lint - Check if project follows CheckStyle rules (must run install-checkstyle first)
lint:
java -jar checkstyle.jar src -c easypost_java_style.xml -d
## publish - Publish a release of the project
# @parameters:
# pass= - The GPG password to sign the release
publish:
mvn clean deploy -Dgpg.passphrase=${pass}
## publish-dry - Build the project as a dry run to publishing
# @parameters:
# pass= - The GPG password to sign the release
publish-dry:
mvn clean install -Dgpg.passphrase=${pass}
## release - Cuts a release for the project on GitHub (requires GitHub CLI)
# tag = The associated tag title of the release
release:
gh release create ${tag} target/*.jar target/*.asc target/*.pom
## scan - Scan the project for serious security issues
scan:
mvn verify -DskipTests=true -Dgpg.skip=true -Dcheckstyle.skip=true -Djavadoc.skip=true -Ddependency-check.failBuildOnCVSS=0 -Ddependency-check.junitFailOnCVSS=0
## test - Test the project
test:
mvn surefire:test
.PHONY: help build clean coverage install-checkstyle install lint publish publish-dry release scan test