This repository has been archived by the owner on Jun 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
68 lines (51 loc) · 1.43 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
DOCKER_IMAGE ?= adobe/cloudinventory
DOCKER_IMAGE_TAG ?= master
DOCKER_IMAGE_TAG_ARM ?= armhf
all: mod-tidy test vet lint install
mod: mod-tidy verify get
mod-tidy:
@echo ">> Running go mod tidy"
@GO111MODULE=on go mod tidy
vendor:
@echo ">> Running go mod vendor"
@GO111MODULE=on go mod vendor
verify:
@echo ">> Running go mod verify"
@GO111MODULE=on go mod verify
get:
@echo ">> Getting Dependencies"
@GO111MODULE go get
build:
@echo ">> Running Build"
@GO111MODULE=on go build
build-main:
@echo ">> Building Binary for current ARCH"
@go build
install:
@echo ">> Building and Installing"
@GO111MODULE=on go install
@echo ">> Done Install"
test-short:
@echo ">> Running Quick Tests"
@GO111MODULE=on go test -short ./...
test:
@echo ">> Running Tests"
@GO111MODULE=on go test -cover -v ./...
vet:
@echo ">> Running Vet"
@GO111MODULE=on go vet ./...
lint:
@echo ">> Running Lint"
@GO111MODULE=on go list ./... | grep -v vender/ | golint
docker:
@echo ">> Building Docker Image"
@docker build -t $(DOCKER_IMAGE):$(DOCKER_IMAGE_TAG) .
docker-push:
@docker login -u $(DOCKER_USERNAME) -p $(DOCKER_PASSWORD)
@docker push $(DOCKER_IMAGE):$(DOCKER_IMAGE_TAG)
docker-arm:
@echo ">> Building Docker Image-ARM"
@docker build -t $(DOCKER_IMAGE):$(DOCKER_IMAGE_TAG_ARM) -f Dockerfile-ARM .
docker-push-arm:
@docker login -u $(DOCKER_USERNAME) -p $(DOCKER_PASSWORD)
@docker push $(DOCKER_IMAGE):$(DOCKER_IMAGE_TAG_ARM)