Skip to content

Commit

Permalink
adjust datetime string (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
copejon authored Jul 26, 2021
1 parent dc58cb3 commit 13acd7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ include ./vendor/github.com/openshift/build-machinery-go/make/targets/openshift/

# TIMESTAMP is defined here, and only here, and propagated through out the build flow. This ensures that every artifact
# (binary version and image tag) all have the exact same build timestamp. Because kubectl/oc expect
# a timestamp composed with ':'s we must replace the chars with '-' so that it is still compliant with image tag format.
# a timestamp composed with ':'s we must adjust the string so that it is still compliant with image tag format.
export BIN_TIMESTAMP ?=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
export TIMESTAMP ?=$(shell echo $(BIN_TIMESTAMP) | tr ':' '-')
export TIMESTAMP ?=$(shell echo $(BIN_TIMESTAMP) | tr -d ':' | tr 'T' '-' | tr -d 'Z')

RELEASE_PRE :=0.4.7-0.microshift
RELEASE_PRE :=4.7.0-0.microshift
# Overload SOURCE_GIT_TAG value set in vendor/github.com/openshift/build-machinery-go/make/lib/golang.mk
# because since it doesn't work with our version scheme.
SOURCE_GIT_TAG :=$(shell git describe --long --tags --abbrev=7 --broke --match '$(RELEASE_PRE)*' || echo 'v0.0.0-unknown')
SOURCE_GIT_TAG :=$(shell git describe --tags --abbrev=7 --broke --match '$(RELEASE_PRE)*' || echo '4.7.0-0.microshift-unknown')

SRC_ROOT :=$(shell pwd)

Expand Down Expand Up @@ -121,4 +121,4 @@ clean: clean-cross-build

release:
./scripts/release.sh --token $(TOKEN) --target $(TARGET) --version $(SOURCE_GIT_TAG)
.PHONY: release
.PHONY: release

0 comments on commit 13acd7a

Please sign in to comment.