-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 732 Bytes
/
Makefile
File metadata and controls
31 lines (24 loc) · 732 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
TM_AM_LOG_LEVEL ?= debug
IMAGE_NAME := amaas/amaas-grpc-java-client:latest
AMAAS_SDK_NAME := file-security-java-sdk
VERSION_LOCATION := './VERSION'
VERSION := $(shell cat $(VERSION_LOCATION))
AMAAS_JAVA_MODULE_VERSION_ID ?= $(VERSION)
all: build
build:
docker build \
-t $(IMAGE_NAME) \
--build-arg PACK_CMD=package \
--build-arg BUILD_VERSION=$(AMAAS_JAVA_MODULE_VERSION_ID) \
.
mkdir -p output
docker run --rm $(IMAGE_NAME) tar -cz target/$(AMAAS_SDK_NAME)-$(AMAAS_JAVA_MODULE_VERSION_ID).jar | tar xzf - -C output
test:
docker build \
-t $(IMAGE_NAME) \
--build-arg PACK_CMD=test \
--build-arg BUILD_VERSION=$(AMAAS_JAVA_MODULE_VERSION_ID) \
.
clean:
rm -rf output target
.PHONY: all build test clean