generated from edgexfoundry-holding/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
49 lines (33 loc) · 938 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.PHONY: build test clean docker
MICROSERVICES=build/release/device-coap
.PHONY: $(MICROSERVICES)
DOCKERS=device_coap
.PHONY: $(DOCKERS)
VERSION=$(shell cat ./VERSION)
GIT_SHA=$(shell git rev-parse HEAD)
build: ./VERSION ${MICROSERVICES}
build/release/device-coap:
scripts/build.sh
test:
@echo $(MICROSERVICES)
clean:
rm -f $(MICROSERVICES)
rm -f ./VERSION
./VERSION:
@git describe --abbrev=0 --tags | sed 's/^v//' > ./VERSION
version: ./VERSION
@echo ${VERSION}
docker: ./VERSION $(DOCKERS)
device_coap:
docker build \
-f scripts/Dockerfile.alpine \
--label "git_sha=$(GIT_SHA)" \
-t edgexfoundry/device-coap:${GIT_SHA} \
-t edgexfoundry/device-coap:${VERSION}-dev \
.
build-debug: build/debug/device-coap
build/debug/device-coap:
scripts/build_debug.sh
clean-debug:
rm -f build/debug/device-coap
.PHONY: build-debug clean-debug