diff --git a/hack/update-helm-repo.sh b/hack/update-helm-repo.sh index 8c74a375f..e457368bf 100755 --- a/hack/update-helm-repo.sh +++ b/hack/update-helm-repo.sh @@ -3,6 +3,8 @@ set -o errexit set -o pipefail -REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. +# Resolve the absolute path of the directory containing the script +SCRIPT_DIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")") +REPO_ROOT="$SCRIPT_DIR/.." cd $REPO_ROOT/hack/chart-update; go run . -release-tag=$1; cd - diff --git a/hack/update-plugin-yaml.sh b/hack/update-plugin-yaml.sh index 0caab0bb4..3264315b2 100755 --- a/hack/update-plugin-yaml.sh +++ b/hack/update-plugin-yaml.sh @@ -3,6 +3,8 @@ set -o errexit set -o pipefail -REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. +# Resolve the absolute path of the directory containing the script +SCRIPT_DIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")") +REPO_ROOT="$SCRIPT_DIR/.." -docker run --rm -v $REPO_ROOT:/home/app ghcr.io/rajatjindal/krew-release-bot:v0.0.46 krew-release-bot template --tag $1 --template-file .krew.yaml > $REPO_ROOT/plugins/clusterctl-operator.yaml \ No newline at end of file +docker run --rm -v "$REPO_ROOT":/home/app ghcr.io/rajatjindal/krew-release-bot:v0.0.46 krew-release-bot template --tag "$1" --template-file .krew.yaml > "$REPO_ROOT"/plugins/clusterctl-operator.yaml