diff --git a/.goreleaser.yml b/.goreleaser.yml index 77cdeb2..d07c80e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,6 +16,7 @@ builds: - '7' flags: - -trimpath + - -tags=safe ldflags: - -s -w -X github.com/foomo/sesamy-cli/cmd.version={{.Version}} @@ -23,10 +24,10 @@ release: prerelease: auto archives: - - format: tar.gz + - formats: [ tar.gz ] format_overrides: - goos: windows - format: zip + formats: [ zip ] changelog: use: github-native @@ -38,3 +39,5 @@ brews: caveats: "sesamy --help" homepage: "https://github.com/foomo/sesamy-cli" description: "CLI utitlity to manage Server Side Tag Management" + test: | + system "#{bin}/sesamy --version" diff --git a/Makefile b/Makefile index 5a7bec4..3268146 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,6 @@ -.DEFAULT_GOAL:=help +.DEFAULT_GOAL := help -include .makerc -# --- Config ----------------------------------------------------------------- - -export PATH := bin:$(PATH) - # --- Targets ----------------------------------------------------------------- # This allows us to accept extra arguments @@ -36,7 +32,7 @@ doc: .PHONY: test ## Run tests test: - @GO_TEST_TAGS=-skip go test -coverprofile=coverage.out -race -json ./... | gotestfmt + @GO_TEST_TAGS=-skip go test -tags=safe -coverprofile=coverage.out -race -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt .PHONY: lint ## Run linter @@ -62,17 +58,17 @@ outdated: ## Build binary build: @mkdir -p bin - @go build -o bin/sesamy main.go + @go build -tags=safe -o bin/sesamy main.go .PHONY: install ## Install binary install: - @go build -o ${GOPATH}/bin/sesamy main.go + @go build -tags=safe -o ${GOPATH}/bin/sesamy main.go .PHONY: install.debug ## Install debug binary install.debug: - @go build -gcflags "all=-N -l" -o ${GOPATH}/bin/sesamy main.go + @go build -tags=safe -gclags="all=-N -l" -o ${GOPATH}/bin/sesamy main.go ## === Utils ===