Skip to content

Commit

Permalink
Merge pull request #38 from reviewdog/actions-commit-and-create-pr/20…
Browse files Browse the repository at this point in the history
…23-08-05-5771903061-1

Auto updates by the depup workflow
  • Loading branch information
shogo82148 authored Aug 5, 2023
2 parents 97aaac9 + 379cae2 commit 8ace6d5
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#!/bin/sh

set -euo pipefail
set -eu

VERSION="${REVIEWDOG_VERSION:-latest}"

Expand All @@ -14,15 +14,24 @@ if [ -z "${TEMP}" ]; then
fi

INSTALL_SCRIPT='https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh'
if [ "${VERSION}" == 'nightly' ] ; then
if [ "${VERSION}" = 'nightly' ]; then
INSTALL_SCRIPT='https://raw.githubusercontent.com/reviewdog/nightly/master/install.sh'
VERSION='latest'
fi

mkdir -p "${TEMP}/reviewdog/bin"

echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog'
curl -sfL "${INSTALL_SCRIPT}" | sh -s -- -b "${TEMP}/reviewdog/bin" "${VERSION}" 2>&1
(
if command -v curl 2>&1 >/dev/null; then
curl -sfL "${INSTALL_SCRIPT}"
elif command -v wget 2>&1 >/dev/null; then
wget -O - "${INSTALL_SCRIPT}"
else
echo "curl or wget is required" >&2
exit 1
fi
) | sh -s -- -b "${TEMP}/reviewdog/bin" "${VERSION}" 2>&1
echo '::endgroup::'

echo "${TEMP}/reviewdog/bin" >>"${GITHUB_PATH}"

0 comments on commit 8ace6d5

Please sign in to comment.