Skip to content

Commit 1432bbe

Browse files
committed
Add view_catalogsource target
Signed-off-by: dkwon17 <dakwon@redhat.com>
1 parent 3ffad0f commit 1432bbe

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.devfile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ commands:
4343
make generate_olm_bundle_yaml build_bundle_and_index
4444
read -p "Run register_catalogsource? (y/n) " -n 1 -r
4545
echo
46-
if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ ! "$(oc whoami)" =~ ^kube:admin$ ]]; then echo "You need to login as kubeadmin" && exit 1; fi && make register_catalogsource; fi
46+
if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ ! "$(oc whoami)" =~ ^kube:admin$ ]]; then echo "You need to login as kubeadmin" && exit 1; fi && make register_catalogsource; else make view_catalogsource; fi
4747
group:
4848
kind: build

build/make/olm.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ register_catalogsource: _check_skopeo_installed
5454
sed -e "s|quay.io/devfile/devworkspace-operator-index:next|$(DWO_INDEX_IMG)|g" ./catalog-source.yaml \
5555
| oc apply -f -
5656

57+
### view_catalogsource: prints the catalog source to standard output
58+
view_catalogsource:
59+
@echo "To apply the catalog source, run:"
60+
@echo ""
61+
@echo "oc apply -f - <<EOF"
62+
@sed -e "s|quay.io/devfile/devworkspace-operator-index:next|$(DWO_INDEX_IMG)|g" ./catalog-source.yaml
63+
@echo "EOF"
64+
5765
### unregister_catalogsource: unregister the catalogsource and delete the imageContentSourcePolicy
5866
unregister_catalogsource:
5967
oc delete catalogsource devworkspace-operator-catalog -n openshift-marketplace --ignore-not-found

0 commit comments

Comments
 (0)