-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (34 loc) · 885 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
# application name
APP = galaxy
# build directory
BUILD_DIR ?= build
# directory containing end-to-end tests
E2E_TEST_DIR ?= test/e2e
# project version, used as docker tag
VERSION ?= $(shell cat ./version)
.PHONY: bootstrap build test
default: build
dep:
go get -u github.com/golang/dep/cmd/dep
bootstrap:
dep ensure -v -vendor-only
build: clean
go build -v -o $(BUILD_DIR)/$(APP) cmd/$(APP)/*
clean:
rm -rf $(BUILD_DIR) > /dev/null
clean-vendor:
rm -rf ./vendor > /dev/null
test:
go test -failfast -race -coverprofile=coverage.txt -covermode=atomic -cover -v pkg/$(APP)/*
integration:
go test -failfast -v $(E2E_TEST_DIR)/*
codecov:
mkdir .ci || true
curl -s -o .ci/codecov.sh https://codecov.io/bash
bash .ci/codecov.sh -t $(CODECOV_TOKEN)
snapshot:
goreleaser --rm-dist --snapshot
release:
git tag $(VERSION)
git push origin $(VERSION)
goreleaser --rm-dist