-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (37 loc) · 1.16 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
NAME := broccoli
VER := $(shell mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
JAR := target/$(NAME)-$(VER).jar
TAG := $(NAME):$(VER)
all: help
$(JAR): $(shell find src -type f) pom.xml
mvn package
.PHONY: build
build: $(JAR)
.PHONY: run-server
run-server: $(JAR)
java -jar $(JAR) server config.yml
.PHONY: clean
clean:
rm -rf .make
mvn clean
.PHONY: version-update
version-update:
mvn versions:set && mvn versions:commit
.make:
mkdir -p .make
.make/.push: .make $(JAR) k8s/broccoli-server/Dockerfile
docker build --tag $(TAG) --platform=linux/amd64 --file k8s/broccoli-server/Dockerfile .
docker tag $(TAG) registry.diginfra.net/tt/$(TAG)
docker push registry.diginfra.net/tt/$(TAG)
@touch $@
.PHONY: push
push: .make/.push
.PHONY: help
help:
@echo "make-tools for $(TAG)"
@echo "Please use \`make <target>' where <target> is one of:"
@echo " build to test and build the app"
@echo " run-server to start the server app"
@echo " push to to push the linux/amd64 docker image to registry.diginfra.net"
@echo " clean to remove generated files"
@echo " version-update to update the project version"