Skip to content

Commit

Permalink
chore: add versions to rhoc cli
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Dec 12, 2022
1 parent 2a86127 commit c909a24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ builds:
goarch:
- amd64
- arm64
ldflags:
- "-s -w -X github.com/bf2fc6cc711aee1a0c2a/cos-tools/rhoc/internal/build.Version={{.Version}}"

release:
prerelease: auto
Expand Down
7 changes: 6 additions & 1 deletion rhoc/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
LOCAL_BIN_PATH := ${PROJECT_PATH}/bin
CLI_VERSION ?= $(shell git rev-parse --short HEAD)

ifeq ($(CLI_VERSION),)
CLI_VERSION := $(shell git rev-parse --short HEAD)
endif

GO_LDFLAGS := -X github.com/bf2fc6cc711aee1a0c2a/cos-tools/rhoc/internal/build.Version=$(CLI_VERSION) $(GO_LDFLAGS)


SHELL = bash

GO := go
Expand Down

0 comments on commit c909a24

Please sign in to comment.