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
Show file tree
Hide file tree
Changes from all commits
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}"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (s *Group) ColumnName_Description() string {
### pre-built binary

```bash
VERSION=v0.0.6
VERSION=v0.0.7

# download
curl -fLROSs https://github.com/kunitsucom/arcgen/releases/download/${VERSION}/arcgen_${VERSION}_darwin_arm64.zip
Expand Down