Skip to content

Commit

Permalink
[fix] Fixing catalog generation envs and params
Browse files Browse the repository at this point in the history
  • Loading branch information
didierofrivia committed Sep 28, 2023
1 parent 4812435 commit d14a8f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions make/catalog.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ $(CATALOG_FILE): $(OPM) $(YQ)
@echo Build limitador operator catalog
@echo
@echo BUNDLE_IMG = $(BUNDLE_IMG)
@echo REPLACES = $(REPLACES)
@echo REPLACES_VERSION = $(REPLACES_VERSION)
@echo CHANNELS = $(CHANNELS)
@echo "************************************************************"
@echo
@echo Please check this matches your expectations and override variables if needed.
@echo
$(PROJECT_PATH)/utils/generate-catalog.sh $(OPM) $(YQ) $(BUNDLE_IMG) $(REPLACES) $(CHANNELS) $@
$(PROJECT_PATH)/utils/generate-catalog.sh $(OPM) $(YQ) $(BUNDLE_IMG) $@ $(REPLACES_VERSION) $(CHANNELS)

.PHONY: catalog
catalog: $(OPM) ## Generate catalog content and validate.
Expand Down
7 changes: 4 additions & 3 deletions utils/generate-catalog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ set -euo pipefail
### CONSTANTS
# Used as well in the subscription object
DEFAULT_CHANNEL=preview
DEFAULT_REPLACES_VERSION=0.0.0-alpha
###

OPM="${1?:Error \$OPM not set. Bye}"
YQ="${2?:Error \$YQ not set. Bye}"
BUNDLE_IMG="${3?:Error \$BUNDLE_IMG not set. Bye}"
REPLACES="${3?:Error \$REPLACES not set. Bye}"
CHANNELS="${4:-$DEFAULT_CHANNEL}"
CATALOG_FILE="${5?:Error \$CATALOG_FILE not set. Bye}"
CATALOG_FILE="${4?:Error \$CATALOG_FILE not set. Bye}"
REPLACES_VERSION="${5:-$DEFAULT_REPLACES_VERSION}"
CHANNELS="${6:-$DEFAULT_CHANNEL}"

CATALOG_FILE_BASEDIR="$( cd "$( dirname "$(realpath ${CATALOG_FILE})" )" && pwd )"
CATALOG_BASEDIR="$( cd "$( dirname "$(realpath ${CATALOG_FILE_BASEDIR})" )" && pwd )"
Expand Down

0 comments on commit d14a8f8

Please sign in to comment.