-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 986 Bytes
/
Makefile
File metadata and controls
52 lines (41 loc) · 986 Bytes
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
SHELL = /bin/bash
.PHONY: build test clean javadoc docs mkdocs-serve gh-deploy-docs deploy package
# Build the project
build:
mvn compile
# Run tests
test:
mvn test
# Build JAR package
package:
mvn package -DskipTests
# Generate Javadoc via Dokka
javadoc:
mvn dokka:dokka dokka:javadoc
# Build MkDocs documentation
docs: javadoc
mkdocs build
mkdocs-serve: docs
mkdocs serve
# Credit to https://github.com/kg4zow/mdbook-template/blob/main/Makefile
gh-deploy-docs: docs
set -ex ; \
WORK="$$( mktemp -d )" ; \
VER="$$( git describe --always --tags --dirty )" ; \
git worktree add --force "$$WORK" gh-pages ; \
rm -rf "$$WORK"/* ; \
rsync -av docs/ "$$WORK"/ ; \
if [ -f CNAME ] ; then cp CNAME "$$WORK"/ ; fi ; \
pushd "$$WORK" ; \
git add -A ; \
git commit -m "Updated gh-pages $$VER" ; \
popd ; \
git worktree remove "$$WORK" ; \
git push origin gh-pages
# Deploy to Maven Central
deploy:
mvn deploy
# Clean build artifacts
clean:
mvn clean
rm -rf site/