mirror of
https://github.com/orhun/git-cliff-action.git
synced 2026-03-22 07:25:43 +08:00
fix(action): put git-cliff binary inside ./bin (#30)
Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
This commit is contained in:
@@ -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
run.sh
4
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"
|
||||
|
||||
Reference in New Issue
Block a user