forked from edgexfoundry/device-grove-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (26 loc) · 793 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
.PHONY: build test clean docker
MICROSERVICES=build/release/device-grove-c/device-grove-c
.PHONY: $(MICROSERVICES)
DOCKERS=docker_device_grove_c
.PHONY: $(DOCKERS)
VERSION=$(shell cat ./VERSION)
GIT_SHA=$(shell git rev-parse HEAD)
build: ./VERSION ${MICROSERVICES}
build/release/device-grove-c/device-grove-c:
scripts/build.sh
test:
@echo $(MICROSERVICES)
clean:
rm -f $(MICROSERVICES)
./VERSION:
@git describe --abbrev=0 | sed 's/^v//' > ./VERSION
version: ./VERSION
echo ${VERSION}
docker: ./VERSION $(DOCKERS)
docker_device_grove_c:
docker build \
-f scripts/Dockerfile.alpine \
--label "git_sha=$(GIT_SHA)" \
-t edgexfoundry/device-grove:${GIT_SHA} \
-t edgexfoundry/device-grove:${VERSION}-dev \
.