-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (34 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
GO ?= go
GOLANGCI_LINT ?= $$($(GO) env GOPATH)/bin/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.54.2
DEST ?= "$(shell (go list ./...))"
.PHONY: lint
lint: linter
$(GOLANGCI_LINT) run
.PHONY: linter
linter:
test -f $(GOLANGCI_LINT) || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$($(GO) env GOPATH)/bin $(GOLANGCI_LINT_VERSION)
.PHONY: test
test:
$(GO) test -v ./...
.PHONY: release
release:
docker run --rm --privileged \
--env-file .release-env \
-v ~/go/pkg/mod:/go/pkg/mod \
-v `pwd`:/go/src/github.com/fairDataSociety/fave \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/fairDataSociety/fave \
ghcr.io/goreleaser/goreleaser-cross:v1.20.2 release --clean
.PHONY: release-dry-run
release-dry-run:
docker run --rm --privileged \
-v ~/go/pkg/mod:/go/pkg/mod \
-v ~/go/bin:/go/bin \
-v `pwd`:/go/src/github.com/fairDataSociety/fave \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/fairDataSociety/fave \
ghcr.io/goreleaser/goreleaser-cross:v1.20.2 release --clean \
--skip-validate=true \
--skip-publish
FORCE: