-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
48 lines (36 loc) · 866 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
# Vars
STAGE_TAG=stage
PROD_TAG=v0.0.1
IMAGE_NAME=mwconfig
# Accounts
DOCKERHUB_USER=n/a
# Go
MAKE_CMD=make
# Go
GO_CMD=go
## Docker
DOCKER_CMD=docker
# Gcloud
GCLOUD_CMD=gcloud
# Misc
BINARY_NAME=config
BINARY_UNIX=$(BINARY_NAME)_unix
all: test build
build:
$(GO_CMD) build ./...
build-linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO_BUILD) -o $(BINARY_UNIX) -v
test:
# Be sure to set up environment variables that apply for your case.
# PROVIDER_ID_KEY_1, PROVIDER_API_KEY_2, AWS_ACCESS_KEY_ID, AWS_SECRET_KEY
$(GO_CMD) test -v ./...
clean:
$(GO_CMD) clean
rm -f ./bin/$(BINARY_NAME)
rm -f ./bin/$(BINARY_UNIX)
deps:
$(GO_CMD) get -u github.com/cenkalti/backoff
$(GO_CMD) get -u github.com/google/uuid
$(GO_CMD) get -u github.com/mitchellh/mapstructure
$(GO_CMD) get -u github.com/streadway/amqp
$(GO_CMD) get -u gitlab.com/mikrowezel/log