Skip to content

Commit

Permalink
fix(action): put git-cliff binary inside ./bin (#30)
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Ortega <[email protected]>
  • Loading branch information
M0NsTeRRR authored Sep 2, 2024
1 parent 8720f56 commit 01a5c9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 01a5c9a

Please sign in to comment.