forked from oviva-ag/ehealthid-relying-party
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (21 loc) · 794 Bytes
/
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
MVN=./mvnw
VERSION?=$(shell $(MVN) -q -Dexec.executable=echo -Dexec.args='$${project.version}' --non-recursive exec:exec)
DOCKER_REPO=ghcr.io/oviva-ag/
IMAGE_NAME=ehealthid-relying-party
GIT_COMMIT=`git rev-parse HEAD`
.PHONY: update-version test unit-test integration-test setup dist build clean install docker
build:
@$(MVN) -T 8 $(MAVEN_CLI_OPTS) -am package
clean:
@$(MVN) -T 8 $(MAVEN_CLI_OPTS) -am clean
test:
@$(MVN) -B verify
update-version:
@$(MVN) -B versions:set "-DnewVersion=$(VERSION)"
docker: build
@docker build -t $(IMAGE_NAME):v$(VERSION) .
dist: build
ifndef RELEASE_TAG
$(error RELEASE_TAG is not set)
endif
docker buildx build --push --platform linux/amd64,linux/arm64 --label git-commit=$(GIT_COMMIT) --tag "$(DOCKER_REPO)$(IMAGE_NAME):$(RELEASE_TAG)" .