ovhcloud-cli/Makefile
mJehanno 41bd2dd54c
feat(me): add me command to get information about the current user
Signed-off-by: mJehanno <mathob.jehanno@hotmail.fr>
2025-09-30 10:21:27 +02:00

30 lines
715 B
Makefile

GIT_DESCRIBE ?= $(shell git describe --tags 2>/dev/null)
SNAPSHOT := $(shell svu next 2>/dev/null)
VERSION ?= $(if ${GIT_TAG},${GIT_DESCRIBE},${SNAPSHOT}-snapshot${CDS_RUN_NUMBER})
LD_PKG = $(shell go list ./internal/version)
LD_FLAGS = -s -w -extldflags -static -X ${LD_PKG}.Version=${VERSION}
BUILD_CMD = CGO_ENABLED=0 go build
all:
${BUILD_CMD} -ldflags "${LD_FLAGS}" -o ovhcloud ./cmd/ovhcloud
wasm:
GOOS=js GOARCH=wasm ${BUILD_CMD} -ldflags "${LD_FLAGS}" -o ovhcloud.wasm ./cmd/ovhcloud
test:
go test -v ./...
fmt:
go fmt ./...
doc:
go run cmd/docgen/main.go
release-snapshot:
goreleaser release --snapshot --clean --parallelism 1
release:
goreleaser release --clean
.PHONY: all wasm doc