-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- use full path to ./bin so mockgen-works - make goreleaser local aswell (now not pulling from releases, but installs) - force not using global goreleaser: the PATH now forces using the local binaries and not the global ones, unless you delete them
- Loading branch information
1 parent
3657a2f
commit bb55118
Showing
3 changed files
with
21 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,10 @@ unexport GOFLAGS | |
# Add OSDCTL `./bin/` dir to path for goreleaser | ||
# This will look for goreleaser first in the local bin dir | ||
# but otherwise can be installed elsewhere on developers machines | ||
export PATH := bin:$(PATH) | ||
BASE_DIR=$(shell pwd) | ||
export PATH:=$(BASE_DIR)/bin:$(PATH) | ||
SHELL := env PATH=$(PATH) /bin/bash | ||
|
||
|
||
all: format mod build test | ||
|
||
|
@@ -16,9 +19,10 @@ fmt: | |
@git diff --exit-code . | ||
|
||
OS := $(shell go env GOOS | sed 's/[a-z]/\U&/') | ||
ARCH := $(shell go env GOARCH) | ||
.PHONY: download-goreleaser | ||
download-goreleaser: | ||
mkdir -p ./bin && curl -sSLf https://github.com/goreleaser/goreleaser/releases/latest/download/goreleaser_${OS}_x86_64.tar.gz -o - | tar --extract --gunzip --directory ./bin goreleaser | ||
GOBIN=${BASE_DIR}/bin/ go install github.com/goreleaser/goreleaser@latest | ||
|
||
# CI build containers don't include goreleaser by default, | ||
# so they need to get it first, and then run the build | ||
|
@@ -33,7 +37,7 @@ build: | |
goreleaser build --rm-dist --snapshot | ||
|
||
release: | ||
goreleaser release --rm-dist | ||
./bin/goreleaser release --rm-dist | ||
|
||
vet: | ||
go vet ${BUILDFLAGS} ./... | ||
|
@@ -51,7 +55,7 @@ mockgen: ensure-mockgen | |
@git diff --exit-code -- ./pkg/provider/aws/mock | ||
|
||
ensure-mockgen: | ||
go get github.com/golang/mock/[email protected] | ||
GOBIN=${BASE_DIR}/bin/ go install github.com/golang/mock/[email protected] | ||
|
||
test: | ||
go test ${BUILDFLAGS} ./... -covermode=atomic -coverpkg=./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.