Skip to content

Commit

Permalink
version: add fallback value for RELEASE_VERSION in Makefile (pingcap#852
Browse files Browse the repository at this point in the history
)

- Updated the Makefile to ensure `RELEASE_VERSION` always has a valid value.
- Added a fallback to `v9.0.0-alpha` if `git describe --tags --dirty` returns an empty string.
- Ensured compatibility with environments like GitHub Actions where tags might not be fetched.
  • Loading branch information
wlwilliamx authored Jan 10, 2025
1 parent dd33c51 commit 0f6d382
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ RELEASE_VERSION =
ifeq ($(RELEASE_VERSION),)
RELEASE_VERSION := $(shell git describe --tags --dirty)
endif
ifeq ($(RELEASE_VERSION),)
RELEASE_VERSION := v9.0.0-alpha
endif

# Version LDFLAGS.
LDFLAGS += -X "$(CDC_PKG)/version.ReleaseVersion=$(RELEASE_VERSION)"
Expand Down

0 comments on commit 0f6d382

Please sign in to comment.