forked from edgexfoundry/security-api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (33 loc) · 897 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (33 loc) · 897 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
#
# Copyright (c) 2018 Dell Technologies, Inc
#
# SPDX-License-Identifier: Apache-2.0
#
.PHONY: build clean test docker run
GO=CGO_ENABLED=0 GO111MODULE=on go
DOCKERS=docker_edgexproxy
.PHONY: $(DOCKERS)
MICROSERVICES=edgexproxy
.PHONY: $(MICROSERVICES)
VERSION=$(shell cat ./VERSION)
GIT_SHA=$(shell git rev-parse HEAD)
build:
cd cmd/edgexproxy && $(GO) build -o $(MICROSERVICES) .
clean:
cd cmd/edgexproxy && rm $(MICROSERVICES)
test:
GO111MODULE=on go test ./... -cover
GO111MODULE=on go vet ./...
gofmt -l .
[ "`gofmt -l .`" = "" ]
run:
cd cmd/edgexproxy && ./$(MICROSERVICES) init=true
docker: $(DOCKERS)
docker_edgexproxy:
docker build \
--no-cache=true --rm=true \
--label "git_sha=$(GIT_SHA)" \
-t edgexfoundry/docker-edgex-proxy-go:$(GIT_SHA) \
-t edgexfoundry/docker-edgex-proxy-go:$(VERSION)-dev \
-t edgexfoundry/docker-edgex-proxy-go:latest \
.