forked from DaoCloud/charts-syncer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (20 loc) · 809 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
OUTPUT = ./dist/charts-syncer
GO_SOURCES = $(shell find . -type f -name '*.go')
GOARCH ?= $(shell go env GOARCH)
VERSION := $(or $(VERSION), dev)
LDFLAGS="-X github.com/bitnami-labs/charts-syncer/cmd.version=$(VERSION)"
.PHONY: unit-test
unit-test:
go test -race -coverprofile=coverage.txt -covermode=atomic `go list ./api/... ./cmd/... ./internal/... ./pkg/... ./staging/...`
curl -s https://codecov.io/bash | bash
test:
GO111MODULE=on go test ./...
cover:
GO111MODULE=on go test -cover ./...
fullcover:
GO111MODULE=on go test -coverprofile=coverage.out ./...
GO111MODULE=on go tool cover -func=coverage.out
gen:
protoc --proto_path=:. --go_out=plugins=grpc:./api api/config.proto api/manifest.proto
build: $(GO_SOURCES)
GO111MODULE=on CGO_ENABLED=0 go build -o $(OUTPUT) -ldflags ${LDFLAGS} ./