Skip to content

Commit

Permalink
Merge pull request #96 from Mirantis/fix-helm-push
Browse files Browse the repository at this point in the history
Fix helm-push Makefile target to ignore error in grep
  • Loading branch information
Kshatrix authored Jul 17, 2024
2 parents 3694d49 + 56690d9 commit db3669e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ dev-undeploy: kustomize ## Undeploy controller from the K8s cluster specified in
.PHONY: helm-push
helm-push: helm-package
@for chart in $(CHARTS_PACKAGE_DIR)/*.tgz; do \
echo "Verifying if $$chart already exists in $(REGISTRY_REPO)"; \
base=$$(basename $$chart .tgz); \
chart_version=$$(echo $$base | grep -o "v\{0,1\}[0-9]\+\.[0-9]\+\.[0-9].*"); \
chart_name="$${base%-"$$chart_version"}"; \
chart_exists=$$($(HELM) pull $(REGISTRY_REPO)/$$chart_name --version $$chart_version --destination /tmp 2>&1 | grep "not found"); \
echo "Verifying if chart $$chart_name, version $$chart_version already exists in $(REGISTRY_REPO)"; \
chart_exists=$$($(HELM) pull $(REGISTRY_REPO)/$$chart_name --version $$chart_version --destination /tmp 2>&1 | grep "not found" || true); \
if [ -z "$$chart_exists" ]; then \
echo "Chart $$chart_name version $$chart_version already exists in the repository."; \
else \
Expand Down

0 comments on commit db3669e

Please sign in to comment.