Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

fix: modify Makefile for build -ldflags #10

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export BUILD_VERSION = $(shell git describe --tags --exact-match HEAD 2>/d
export BUILD_REVISION = $(shell git rev-parse HEAD)
export BUILD_BRANCH = $(shell git rev-parse --abbrev-ref HEAD | tr / -)
export BUILD_TIMESTAMP = $(shell git log -n 1 --format='%cI')
export GO_LDFLAGS = "-s -w -X github.com/kunitsucom/util.go/version.version=${BUILD_VERSION} -X github.com/kunitsucom/util.go/version.revision=${BUILD_REVISION} -X github.com/kunitsucom/util.go/version.branch=${BUILD_BRANCH} -X github.com/kunitsucom/util.go/version.timestamp=${BUILD_TIMESTAMP}"

.DEFAULT_GOAL := help
.PHONY: help
Expand Down Expand Up @@ -91,6 +90,6 @@ release: ci ## Run goxz and gh release upload
@command -v goxz >/dev/null || go install github.com/Songmu/goxz/cmd/goxz@latest
git checkout main
git checkout "${GIT_TAG_LATEST}"
-goxz -d "${REPO_TMP_DIR}" -os=linux,darwin,windows -arch=amd64,arm64 -pv "`git describe --tags --abbrev=0`" -trimpath -build-ldflags ${GO_LDFLAGS} ./cmd/arcgen
-goxz -d "${REPO_TMP_DIR}" -os=linux,darwin,windows -arch=amd64,arm64 -pv "`git describe --tags --abbrev=0`" -trimpath -build-ldflags "-s -w -X github.com/kunitsucom/util.go/version.version=${BUILD_VERSION} -X github.com/kunitsucom/util.go/version.revision=${BUILD_REVISION} -X github.com/kunitsucom/util.go/version.branch=${BUILD_BRANCH} -X github.com/kunitsucom/util.go/version.timestamp=${BUILD_TIMESTAMP}" ./cmd/arcgen
-gh release upload "`git describe --tags --abbrev=0`" "${REPO_TMP_DIR}"/*"`git describe --tags --abbrev=0`"*
git checkout "${GIT_BRANCH_CURRENT}"
Loading