Skip to content

Commit ec7a7aa

Browse files
Use absolute path in update scripts
Signed-off-by: alexander-demicev <[email protected]>
1 parent c7b2109 commit ec7a7aa

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

hack/update-helm-repo.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
set -o errexit
44
set -o pipefail
55

6-
REPO_ROOT=$(dirname "${BASH_SOURCE}")/..
6+
# Resolve the absolute path of the directory containing the script
7+
SCRIPT_DIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
8+
REPO_ROOT="$SCRIPT_DIR/.."
79

810
cd $REPO_ROOT/hack/chart-update; go run . -release-tag=$1; cd -

hack/update-plugin-yaml.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
set -o errexit
44
set -o pipefail
55

6-
REPO_ROOT=$(dirname "${BASH_SOURCE}")/..
6+
# Resolve the absolute path of the directory containing the script
7+
SCRIPT_DIR=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
8+
REPO_ROOT="$SCRIPT_DIR/.."
79

8-
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
10+
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

0 commit comments

Comments
 (0)