Skip to content

Commit f07f5ee

Browse files
Merge pull request #889 from openshift-bot/synchronize-upstream
NO-ISSUE: Synchronize From Upstream Repositories
2 parents 9172366 + 4bf924a commit f07f5ee

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

staging/operator-lifecycle-manager/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,18 @@ export CGO_ENABLED ?= 0
7171
export GO111MODULE ?= on
7272
export GIT_REPO := $(shell go list -m)
7373
export GIT_COMMIT := $(shell git rev-parse HEAD)
74-
export VERSION := $(shell cat OLM_VERSION)
7574
export VERSION_PATH := ${GIT_REPO}/pkg/version
7675

76+
ifeq ($(origin VERSION), undefined)
77+
VERSION := $(shell git describe --tags --always --dirty)
78+
endif
79+
export VERSION
80+
7781
# GO_BUILD flags are set with = to allow for re-evaluation of the variables
7882
export GO_BUILD_ASMFLAGS = all=-trimpath=$(PWD)
7983
export GO_BUILD_GCFLAGS = all=-trimpath=$(PWD)
8084
export GO_BUILD_FLAGS = -mod=vendor -buildvcs=false
81-
export GO_BUILD_LDFLAGS = -s -w -X '$(VERSION_PATH).version=$(VERSION)' -X '$(VERSION_PATH).gitCommit=$(GIT_COMMIT)' -extldflags "-static"
85+
export GO_BUILD_LDFLAGS = -s -w -X '$(VERSION_PATH).OLMVersion=$(VERSION)' -X '$(VERSION_PATH).GitCommit=$(GIT_COMMIT)' -extldflags "-static"
8286
export GO_BUILD_TAGS = json1
8387

8488
# GO_TEST flags are set with = to allow for re-evaluation of the variables
@@ -330,7 +334,6 @@ ifeq ($(PACKAGE_QUICKSTART), true)
330334
endif
331335

332336
.PHONY: release
333-
release: RELEASE_VERSION=v$(shell cat OLM_VERSION) #HELP Generate an OLM release (NOTE: before running release, bump the version in ./OLM_VERSION and push to master, then tag those builds in quay with the version in ./OLM_VERSION)
334337
release: pull-opm manifests # pull the opm image to get the digest
335338
@echo "Generating the $(RELEASE_VERSION) release"
336339
docker pull $(IMAGE_REPO):$(RELEASE_VERSION)

staging/operator-lifecycle-manager/OLM_VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)