-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (52 loc) · 1.48 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
.SILENT:
TAG:=build tag
ENV:=env
RELEASE_MESSAGE=$(shell git log `git describe --tags --abbrev=0`..master --oneline --no-decorate | sed 's/"/\\"/g' | awk '{printf "%s\\n", $$0}')
.PHONY: clean
clean:
./gradlew clean
.PHONY: install
install:
./gradlew build -x test -x spotlessCheck
.PHONY: build
build: spotless
./gradlew clean build test --tests "br.com.rbarbioni.unit*"
.PHONY: build/only
build/only:
./gradlew clean build -x test -x spotlessCheck
.PHONY: build/docker
build/docker: build
docker build -t rbarbioni/micronaut-api .
.PHONY: test
test:
./gradlew test
.PHONY: test/unit
test/unit:
./gradlew test --tests "br.com.rbarbioni.unit*" --info
.PHONY: test/integration
test/integration:
./gradlew test --tests "br.com.rbarbioni.integration*" --info
.PHONY: spotless
spotless:
./gradlew spotlessApply
.PHONY: run/docker-compose
run/docker-compose: down
docker-compose up -d
.PHONY: run/docker-compose-structure
run/docker-compose-structure: down
docker-compose -f docker-compose.yml up --scale micronaut-api=0 -d
.PHONY: down
down:
docker-compose -f docker-compose.yml down --remove-orphans
.PHONY: run
run: build run/docker-compose-structure
java -jar ${JAVA_OPTS} build/libs/micronaut-api-all.jar
.PHONY: run/local
run/local: build/only
java -jar -DENV=dev -DLEVEL=INFO build/libs/micronaut-api-all.jar
.PHONY: run/gradle
run/gradle: build
./gradlew run --continuous
.PHONY: run/docker
run/docker: build/docker
docker run -it -p 8080:8080 rbarbioni/micronaut-api:latest -d