Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDP-277877: Use NEXT_VERSION on make runs #1855

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ DOCKER_SBOM_PLUGIN_VERSION=0.6.1
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= $(shell git describe --tags --dirty --broken | cut -c 2-)

# NEXT_VERSION represents a version that is higher than anything released
# VERSION default value does not play well with the run target which might end up failing
# with errors such as:
# "version of the resource $Resource is higher than the operator version $VERSION"
# This happens if you use exported YAMLs from CLI and the dirty version is deemed a pre-release
NEXT_VERSION = 99.99.99-next

MAJOR_VERSION = $(shell cat major-version)

# CHANNELS define the bundle channels used in the bundle.
Expand Down Expand Up @@ -510,6 +517,7 @@ run: prepare-run ## Run a freshly compiled manager against kind
ifdef RUN_YAML
kubectl apply -f $(RUN_YAML)
endif
VERSION=$(NEXT_VERSION) \
OPERATOR_POD_NAME=$(OPERATOR_POD_NAME) \
OPERATOR_NAMESPACE=$(OPERATOR_NAMESPACE) \
bin/manager --object-deletion-protection=false --log-level=$(RUN_LOG_LEVEL) \
Expand Down
Loading