forked from argoproj-labs/argocd-notifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (25 loc) · 726 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
VERSION?=$(shell cat VERSION)
IMAGE_TAG?=v$(VERSION)
IMAGE_PREFIX?=argoprojlabs
DOCKER_PUSH?=false
.PHONY: test
test:
go test ./... -coverprofile=coverage.out
.PHONY: lint
lint:
golangci-lint run
.PHONY: manifests
manifests:
kustomize build manifests/controller > manifests/install.yaml
kustomize build manifests/bot > manifests/install-bot.yaml
.PHONY: generate
generate: manifests
go generate ./...
./hack/docs.sh
.PHONY: build
build:
CGO_ENABLED=0 go build -ldflags="-w -s" -o ./dist/argocd-notifications ./cmd
.PHONY: image
image:
docker build -t $(IMAGE_PREFIX)/argocd-notifications:$(IMAGE_TAG) .
@if [ "$(DOCKER_PUSH)" = "true" ] ; then docker push $(IMAGE_PREFIX)/argocd-notifications:$(IMAGE_TAG) ; fi