From eafa8cee7bc574aa0d12f9f3dd953b9429f6ccdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Gond=C5=BEa?= Date: Thu, 13 Aug 2026 14:18:31 +0200 Subject: [PATCH] Fix: Permit running `make propagate-manifests` from any directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was silently assuming running from `hack/` Signed-off-by: Oliver Gondža --- hack/propagate.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hack/propagate.sh b/hack/propagate.sh index 998908fca03..1b306057d47 100755 --- a/hack/propagate.sh +++ b/hack/propagate.sh @@ -1,6 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash +set -eEu +trap 's=$?; echo >&2 "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR -set -e +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)" +cd "$DIR/.." FROM_BRANCH="master" SKIP_MAKE=false @@ -41,18 +44,17 @@ mkdir -p /tmp/argocd-operator-hack git clone --depth 1 --branch "$FROM_BRANCH" --single-branch --no-tags https://github.com/argoproj-labs/argocd-operator.git /tmp/argocd-operator-hack/ -changedFiles=$(diff -qr /tmp/argocd-operator-hack/config/crd/bases/ ../config/crd/bases/ | grep -v argoproj.io_argocdexports.yaml | grep differ | awk -F ' ' '{print $2}') +changedFiles=$(diff -qr /tmp/argocd-operator-hack/config/crd/bases/ ./config/crd/bases/ | grep -v argoproj.io_argocdexports.yaml | grep differ | awk -F ' ' '{print $2}') echo "Changed Files" -echo $changedFiles +echo "$changedFiles" if [ -z "$changedFiles" ] then echo "No difference found" else - cp ${changedFiles} ../config/crd/bases/ + cp ${changedFiles} ./config/crd/bases/ if [ "$SKIP_MAKE" = false ]; then - cd .. make bundle else echo "Skipping 'make bundle' (--skip-make specified)"