From 01a5c9a9d14d5473ac7e2a66042ab52ca8969fbe Mon Sep 17 00:00:00 2001 From: Ludovic Ortega Date: Mon, 2 Sep 2024 14:07:20 +0200 Subject: [PATCH] fix(action): put git-cliff binary inside ./bin (#30) Signed-off-by: Ludovic Ortega --- install.sh | 5 ++++- run.sh | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index fd9fe87..7401f72 100755 --- a/install.sh +++ b/install.sh @@ -33,9 +33,12 @@ LOCATION="$(echo "${RELEASE_INFO}" \ | jq --raw-output ".assets[].browser_download_url" \ | grep "${TARGET}$")" +# Create bin directory +mkdir -p ./bin + # Skip downloading release if downloaded already, e.g. when the action is used multiple times. if [[ ! -e "$TARGET" ]]; then curl --silent --show-error --fail --location --output "$TARGET" "$LOCATION" tar -xf "$TARGET" - mv git-cliff-${TAG_NAME:1}/git-cliff . + mv git-cliff-${TAG_NAME:1}/git-cliff ./bin/git-cliff fi diff --git a/run.sh b/run.sh index 3c699e2..8309f47 100755 --- a/run.sh +++ b/run.sh @@ -17,12 +17,12 @@ mkdir -p "$(dirname $OUTPUT)" args=$(echo "$@" | xargs) # Execute git-cliff -GIT_CLIFF_OUTPUT="$OUTPUT" ./git-cliff $args +GIT_CLIFF_OUTPUT="$OUTPUT" ./bin/git-cliff $args exit_code=$? # Retrieve context CONTEXT="$(mktemp)" -GIT_CLIFF_OUTPUT="$CONTEXT" ./git-cliff $args --context +GIT_CLIFF_OUTPUT="$CONTEXT" ./bin/git-cliff $args --context # Output to console cat "$OUTPUT"