Skip to content

Commit

Permalink
Use valid semver in run/pipecd command (#4851)
Browse files Browse the repository at this point in the history
* Use valid semver in run/pipecd command

Signed-off-by: David <19214156+dgannon991@users.noreply.github.com>

* Swapped to simpler local version

Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>

* Include a comment explaining why we hard coded

Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>

---------

Signed-off-by: David <19214156+dgannon991@users.noreply.github.com>
Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
  • Loading branch information
dgannon991 committed Apr 13, 2024
1 parent 4436527 commit cfeac53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ test/integration:

.PHONY: run/pipecd
run/pipecd: $(eval TIMESTAMP = $(shell date +%s))
run/pipecd: BUILD_VERSION ?= "$(shell git describe --tags --always --abbrev=7)-$(TIMESTAMP)"
# NOTE: previously `git describe --tags` was used to determine the version for running locally
# However, this does not work on a forked branch, so the decision was made to hardcode at version 0.0.0
# see: https://github.com/pipe-cd/pipecd/issues/4845
run/pipecd: BUILD_VERSION ?= "v0.0.0-$(shell git rev-parse --short HEAD)-$(TIMESTAMP)"
run/pipecd: BUILD_COMMIT ?= $(shell git rev-parse HEAD)
run/pipecd: BUILD_DATE ?= $(shell date -u '+%Y%m%d-%H%M%S')
run/pipecd: BUILD_LDFLAGS_PREFIX := -X github.com/pipe-cd/pipecd/pkg/version
Expand Down

0 comments on commit cfeac53

Please sign in to comment.