forked from CircleCI-Public/circleci-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (41 loc) · 1.12 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
default: build
GOOS=$(shell go env GOOS)
GOARCH=$(shell go env GOARCH)
build: always
GO111MODULE=on .circleci/pack.sh
go build -o build/$(GOOS)/$(GOARCH)/circleci
build-all: build/linux/amd64/circleci build/darwin/amd64/circleci
build/%/amd64/circleci: always
GOOS=$* GOARCH=amd64 go build -v -o $@ .
.PHONY: clean
clean:
GO111MODULE=off go clean -i
rm -rf build out docs dist
.circleci/pack.sh clean
.PHONY: test
test:
go test -v ./...
.PHONY: cover
cover:
go test -race -coverprofile=coverage.txt ./...
.PHONY: lint
lint:
@echo Executing local build of lint job until gometalinter supports Go 1.11 modules...
@echo This requires Docker to run, so it may fail if docker cannot be found.
@echo
@echo Generating tmp/processed.yml from .circleci/config.yml 2.1 version
go run main.go config process .circleci/config.yml > .circleci/processed.yml
@echo
@echo Running local build..
go run main.go local execute -c .circleci/processed.yml --job lint
.PHONY: doc
doc:
godoc -http=:6060
.PHONY: install-packr
install-packr:
bash .circleci/install-packr.sh
.PHONY: pack
pack:
bash .circleci/pack.sh
.PHONY: always
always: