generated from VEuPathDB/example-jaxrs-container-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
121 lines (97 loc) · 2.85 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<<<<<<< HEAD
APP_PACKAGE := $(shell ./gradlew -q print-package | tail -1)
MAIN_DIR := src/main/java/$(shell echo $(APP_PACKAGE) | sed 's/\./\//g')
TEST_DIR := $(shell echo $(MAIN_DIR) | sed 's/main/test/')
BIN_DIR := .tools/bin
C_BLUE := "\\033[94m"
C_NONE := "\\033[0m"
C_CYAN := "\\033[36m"
C_RED := "\\033[31m"
=======
>>>>>>> template/master
#
# Development environment setup / teardown
#
<<<<<<< HEAD
.PHONY: help
help:
@echo "Targets:\n`cat makefile | grep '^[a-z\-]\+:' | sed 's/:.*//;s/^/ /'`"
#
# Project & Environment Setup Targets
#
.PHONY: new-project-initialization
new-project-initialization:
@if [ ! 1 -eq `git rev-list --all --count` ]; then \
echo ; \
echo "$(C_RED)-- ERROR -----------------------------------------------------------------------$(C_NONE)"; \
echo "This make target cannot not be used after a new project already has commits.";\
echo "Merging the histories of the template repository and a project based on it may";\
echo "cause issues and must be done with care.";\
echo "$(C_RED)--------------------------------------------------------------------------------$(C_NONE)";\
echo ; \
exit 1; \
fi
$(MAKE) register-template-repo
@git fetch template
@git merge template/master --allow-unrelated-histories
.PHONY: link-template-repo
link-template-repo:
@git remote add template [email protected]:VEuPathDB/example-jaxrs-container-service.git
# Merges in changes from the template/example repo.
.PHONY: merge-template-repo
merge-template-repo:
@git remote show template > /dev/null 2>&1 || (echo "\n$(C_RED)Template repo has not been registered.$(C_NONE)\n\nRun 'make link-template-repo'\n"; exit 1)
@git fetch template
@git merge template/master
=======
>>>>>>> template/master
.PHONY: install-dev-env
install-dev-env:
./gradlew check-env
.PHONY: clean
clean:
@rm -rf .bin .gradle .tools build vendor
#
# Build & Test Targets
#
.PHONY: compile
compile:
./gradlew clean compileJava
.PHONY: test
test:
./gradlew clean test
.PHONY: jar
jar: build/libs/service.jar
.PHONY: docker
docker:
./gradlew build-docker --stacktrace
#
# Code & Doc Generation
#
.PHONY: raml-gen-code
raml-gen-code:
./gradlew generate-jaxrs
.PHONY: raml-gen-docs
raml-gen-docs:
./gradlew generate-raml-docs
.PHONY: example-build
example-build:
@docker compose -f docker-compose/docker-compose.dev.yml build \
--build-arg=GITHUB_USERNAME=${GITHUB_USERNAME} \
--build-arg=GITHUB_TOKEN=${GITHUB_TOKEN}
.PHONY: example-run
example-run:
@docker compose -f docker-compose/docker-compose.dev.yml up
.PHONY: example-clean
example-clean:
@docker compose -f docker-compose/docker-compose.dev.yml down
#
# File based targets
#
build/libs/service.jar: build.gradle.kts
<<<<<<< HEAD
@echo "$(C_BLUE)Building application jar$(C_NONE)"
@./gradlew clean test shadowJar
=======
./gradlew clean test generate-raml-docs shadowJar
>>>>>>> template/master