-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·39 lines (27 loc) · 801 Bytes
/
Makefile
File metadata and controls
executable file
·39 lines (27 loc) · 801 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
32
33
34
35
36
37
38
39
.PHONY: build test clean docker
MICROSERVICES=build/release/device-can/device-can
.PHONY: $(MICROSERVICES)
DOCKERS=docker_device_can
.PHONY: $(DOCKERS)
VERSION=$(shell cat ./VERSION || echo 0.0.0)
GIT_SHA=$(shell git rev-parse HEAD)
build: ./VERSION ${MICROSERVICES}
build/release/device-can/device-can:
scripts/build.sh
test:
@echo $(MICROSERVICES)
clean:
rm -f $(MICROSERVICES)
rm -f ./VERSION
./VERSION:
@git describe --abbrev=0 | sed 's/^v//' > ./VERSION
version: ./VERSION
@echo ${VERSION}
docker: ./VERSION $(DOCKERS)
docker_device_can:
docker build \
-f scripts/Dockerfile.alpine \
--label "git_sha=$(GIT_SHA)" \
-t edgexfoundry/device-can:${GIT_SHA} \
-t edgexfoundry/device-can:${VERSION}-dev \
.