mirror of
https://github.com/orhun/git-cliff-action.git
synced 2026-03-24 08:25:45 +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" \
|
| jq --raw-output ".assets[].browser_download_url" \
|
||||||
| grep "${TARGET}$")"
|
| grep "${TARGET}$")"
|
||||||
|
|
||||||
|
# Create bin directory
|
||||||
|
mkdir -p ./bin
|
||||||
|
|
||||||
# Skip downloading release if downloaded already, e.g. when the action is used multiple times.
|
# Skip downloading release if downloaded already, e.g. when the action is used multiple times.
|
||||||
if [[ ! -e "$TARGET" ]]; then
|
if [[ ! -e "$TARGET" ]]; then
|
||||||
curl --silent --show-error --fail --location --output "$TARGET" "$LOCATION"
|
curl --silent --show-error --fail --location --output "$TARGET" "$LOCATION"
|
||||||
tar -xf "$TARGET"
|
tar -xf "$TARGET"
|
||||||
mv git-cliff-${TAG_NAME:1}/git-cliff .
|
mv git-cliff-${TAG_NAME:1}/git-cliff ./bin/git-cliff
|
||||||
fi
|
fi
|
||||||
|
|||||||
4
run.sh
4
run.sh
@@ -17,12 +17,12 @@ mkdir -p "$(dirname $OUTPUT)"
|
|||||||
args=$(echo "$@" | xargs)
|
args=$(echo "$@" | xargs)
|
||||||
|
|
||||||
# Execute git-cliff
|
# Execute git-cliff
|
||||||
GIT_CLIFF_OUTPUT="$OUTPUT" ./git-cliff $args
|
GIT_CLIFF_OUTPUT="$OUTPUT" ./bin/git-cliff $args
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
|
|
||||||
# Retrieve context
|
# Retrieve context
|
||||||
CONTEXT="$(mktemp)"
|
CONTEXT="$(mktemp)"
|
||||||
GIT_CLIFF_OUTPUT="$CONTEXT" ./git-cliff $args --context
|
GIT_CLIFF_OUTPUT="$CONTEXT" ./bin/git-cliff $args --context
|
||||||
|
|
||||||
# Output to console
|
# Output to console
|
||||||
cat "$OUTPUT"
|
cat "$OUTPUT"
|
||||||
|
|||||||
Reference in New Issue
Block a user