Skip to content

Commit c0a3d4f

Browse files
Merge pull request #2276 from onflow/janez/cleanup
Makefile cleanup
2 parents d571b28 + 97276d6 commit c0a3d4f

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ Install the necessary dependencies:
3030
go get ./...
3131
```
3232

33-
Generate mocks:
34-
```
35-
go generate
36-
```
37-
3833
To run the repo:
3934

4035
```

Makefile

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,21 @@
22
PACKAGE_NAME := github.com/onflow/flow-cli
33
GOLANG_CROSS_VERSION ?= v1.25.0
44

5-
# The tag of the current commit, otherwise empty
5+
# Version tag from git (empty if not on a tagged commit)
66
VERSION := $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null)
7-
# Name of the cover profile
7+
# Coverage report output file
88
COVER_PROFILE := coverage.txt
9-
# Disable go sum database lookup for private repos
10-
GOPRIVATE := github.com/dapperlabs/*
11-
# Ensure go bin path is in path (Especially for CI)
12-
GOPATH ?= $(HOME)/go
13-
PATH := $(PATH):$(GOPATH)/bin
14-
# OS
15-
UNAME := $(shell uname)
169

10+
# Analytics and account tokens (embedded in binary)
1711
MIXPANEL_PROJECT_TOKEN := 3fae49de272be1ceb8cf34119f747073
1812
ACCOUNT_TOKEN := lilico:sF60s3wughJBmNh2
1913

14+
# Output binary path (can be overridden)
2015
BINARY ?= ./cmd/flow/flow
2116

2217
.PHONY: binary
2318
binary: $(BINARY)
2419

25-
.PHONY: install-tools
26-
install-tools:
27-
cd '${GOPATH}'; \
28-
mkdir -p '${GOPATH}'; \
29-
GO111MODULE=on go install github.com/sanderhahn/gozip/cmd/gozip@latest; \
30-
GO111MODULE=on go install github.com/vektra/mockery/[email protected];
31-
3220
.PHONY: test
3321
test:
3422
CGO_ENABLED=1 CGO_CFLAGS="-O2 -D__BLST_PORTABLE__ -std=gnu11" GO111MODULE=on go test -coverprofile=$(COVER_PROFILE) $(if $(JSON_OUTPUT),-json,) ./...
@@ -44,12 +32,10 @@ ifeq ($(COVER), true)
4432
go tool cover -html=$(COVER_PROFILE) -o index.html
4533
# Generate textual summary.
4634
go tool cover -func=$(COVER_PROFILE) | tee cover-summary.txt
47-
# Optionally zip the HTML (if gozip installed) for CI systems expecting an artifact.
48-
if [ -x "$(shell command -v gozip 2>/dev/null)" ]; then gozip -c coverage.zip index.html || true; fi
4935
endif
5036

5137
.PHONY: ci
52-
ci: install-tools generate test coverage
38+
ci: generate test coverage
5339

5440
$(BINARY):
5541
CGO_ENABLED=1 \
@@ -97,7 +83,7 @@ check-tidy:
9783
go mod tidy
9884

9985
.PHONY: generate
100-
generate: install-tools
86+
generate:
10187
go generate ./...
10288

10389
.PHONY: release
@@ -110,4 +96,4 @@ release:
11096
-v `pwd`/sysroot:/sysroot \
11197
-w /go/src/$(PACKAGE_NAME) \
11298
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
113-
release --clean
99+
release --clean

0 commit comments

Comments
 (0)