File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 44 - binary : mongodb_exporter
55 id : mongodb_exporter
66 env :
7+ - CGO_ENABLED=0
78 goos :
89 - linux
910 - darwin
Original file line number Diff line number Diff line change 1- .PHONY : all build clean default help init test format check-license
1+ .PHONY : all build clean default help init test format check-license release-dry-run release-dry-run-docker release-dry-run-fast
22default : help
33
44GO_TEST_PATH ?= ./...
@@ -83,6 +83,21 @@ release: ## Build the binaries using goreleaser
8383 -w /go/src/github.com/user/repo \
8484 goreleaser/goreleaser release --snapshot --skip=publish --clean
8585
86+ release-dry-run : # # Build cross-platform binaries locally without publishing
87+ @echo " Building cross-platform binaries with GoReleaser..."
88+ @if command -v goreleaser > /dev/null 2>&1 ; then \
89+ goreleaser build --snapshot --clean; \
90+ else \
91+ echo " GoReleaser not found. Installing via Docker..." ; \
92+ docker run --rm --privileged \
93+ -v ${PWD} :/go/src/github.com/percona/mongodb_exporter \
94+ -v /var/run/docker.sock:/var/run/docker.sock \
95+ -w /go/src/github.com/percona/mongodb_exporter \
96+ goreleaser/goreleaser build --snapshot --clean; \
97+ fi
98+ @find build -name mongodb_exporter -type f | sort
99+
100+
86101FILES = $(shell find . -type f -name '* .go' -not -path "./vendor/* ")
87102
88103format : # # Format source code
You can’t perform that action at this time.
0 commit comments