Conversation
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
shfmt
[shfmt] reported by reviewdog 🐶
Line 286 in 85cea3a
[shfmt] reported by reviewdog 🐶
Lines 379 to 397 in 85cea3a
[shfmt] reported by reviewdog 🐶
Line 430 in 85cea3a
[shfmt] reported by reviewdog 🐶
Lines 443 to 444 in 85cea3a
[shfmt] reported by reviewdog 🐶
Lines 447 to 448 in 85cea3a
[shfmt] reported by reviewdog 🐶
Lines 451 to 452 in 85cea3a
| ------------------------------------------------------------------------ | ||
| EOF | ||
|
|
||
|
|
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| hash_sha256 "$1" | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" --strip-components "${strip_components}" ;; | ||
| *.tar.xz) tar --no-same-owner -xJf "${tarball}" --strip-components "${strip_components}" ;; | ||
| *.tar.bz2) tar --no-same-owner -xjf "${tarball}" --strip-components "${strip_components}" ;; | ||
| *.tar) tar --no-same-owner -xf "${tarball}" --strip-components "${strip_components}" ;; | ||
| *.gz) gunzip "${tarball}" ;; | ||
| *.zip) | ||
| # unzip doesn't have a standard --strip-components | ||
| # Workaround: extract to a subdir and move contents up if stripping | ||
| if [ "$strip_components" -gt 0 ]; then | ||
| extract_dir=$(basename "${tarball%.zip}")_extracted | ||
| unzip -q "${tarball}" -d "${extract_dir}" | ||
| # Move contents of the *first* directory found inside extract_dir up | ||
| # This assumes wrap_in_directory=true convention | ||
| first_subdir=$(find "${extract_dir}" -mindepth 1 -maxdepth 1 -type d -print -quit) | ||
| if [ -n "$first_subdir" ]; then | ||
| # Move all contents (* includes hidden files) | ||
| mv "${first_subdir}"/* . | ||
| # Optionally remove the now-empty subdir and the extract_dir | ||
| rmdir "${first_subdir}" | ||
| rmdir "${extract_dir}" |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar.xz) tar --no-same-owner -xJf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar.bz2) tar --no-same-owner -xjf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar) tar --no-same-owner -xf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.gz) gunzip "${tarball}" ;; | |
| *.zip) | |
| # unzip doesn't have a standard --strip-components | |
| # Workaround: extract to a subdir and move contents up if stripping | |
| if [ "$strip_components" -gt 0 ]; then | |
| extract_dir=$(basename "${tarball%.zip}")_extracted | |
| unzip -q "${tarball}" -d "${extract_dir}" | |
| # Move contents of the *first* directory found inside extract_dir up | |
| # This assumes wrap_in_directory=true convention | |
| first_subdir=$(find "${extract_dir}" -mindepth 1 -maxdepth 1 -type d -print -quit) | |
| if [ -n "$first_subdir" ]; then | |
| # Move all contents (* includes hidden files) | |
| mv "${first_subdir}"/* . | |
| # Optionally remove the now-empty subdir and the extract_dir | |
| rmdir "${first_subdir}" | |
| rmdir "${extract_dir}" | |
| *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar.xz) tar --no-same-owner -xJf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar.bz2) tar --no-same-owner -xjf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar) tar --no-same-owner -xf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.gz) gunzip "${tarball}" ;; | |
| *.zip) | |
| # unzip doesn't have a standard --strip-components | |
| # Workaround: extract to a subdir and move contents up if stripping | |
| if [ "$strip_components" -gt 0 ]; then | |
| extract_dir=$(basename "${tarball%.zip}")_extracted | |
| unzip -q "${tarball}" -d "${extract_dir}" | |
| # Move contents of the *first* directory found inside extract_dir up | |
| # This assumes wrap_in_directory=true convention | |
| first_subdir=$(find "${extract_dir}" -mindepth 1 -maxdepth 1 -type d -print -quit) | |
| if [ -n "$first_subdir" ]; then | |
| # Move all contents (* includes hidden files) | |
| mv "${first_subdir}"/* . | |
| # Optionally remove the now-empty subdir and the extract_dir | |
| rmdir "${first_subdir}" | |
| rmdir "${extract_dir}" | |
| else | |
| log_warn "Could not find subdirectory in zip to strip components from ${extract_dir}" | |
| # Files are extracted in current dir anyway, proceed | |
| fi |
| log_warn "Could not find subdirectory in zip to strip components from ${extract_dir}" | ||
| # Files are extracted in current dir anyway, proceed |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| log_warn "Could not find subdirectory in zip to strip components from ${extract_dir}" | |
| # Files are extracted in current dir anyway, proceed | |
| unzip -q "${tarball}" |
| else | ||
| unzip -q "${tarball}" | ||
| fi | ||
| ;; | ||
| *) | ||
| log_err "untar unknown archive format for ${tarball}" | ||
| return 1 | ||
| ;; |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| else | |
| unzip -q "${tarball}" | |
| fi | |
| ;; | |
| *) | |
| log_err "untar unknown archive format for ${tarball}" | |
| return 1 | |
| ;; | |
| ;; | |
| *) | |
| log_err "untar unknown archive format for ${tarball}" | |
| return 1 | |
| ;; |
| hash_sha256 "$1" | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" --strip-components "${strip_components}" ;; | ||
| *.tar.xz) tar --no-same-owner -xJf "${tarball}" --strip-components "${strip_components}" ;; | ||
| *.tar.bz2) tar --no-same-owner -xjf "${tarball}" --strip-components "${strip_components}" ;; | ||
| *.tar) tar --no-same-owner -xf "${tarball}" --strip-components "${strip_components}" ;; | ||
| *.gz) gunzip "${tarball}" ;; | ||
| *.zip) | ||
| # unzip doesn't have a standard --strip-components | ||
| # Workaround: extract to a subdir and move contents up if stripping | ||
| if [ "$strip_components" -gt 0 ]; then | ||
| extract_dir=$(basename "${tarball%.zip}")_extracted | ||
| unzip -q "${tarball}" -d "${extract_dir}" | ||
| # Move contents of the *first* directory found inside extract_dir up | ||
| # This assumes wrap_in_directory=true convention | ||
| first_subdir=$(find "${extract_dir}" -mindepth 1 -maxdepth 1 -type d -print -quit) | ||
| if [ -n "$first_subdir" ]; then | ||
| # Move all contents (* includes hidden files) | ||
| mv "${first_subdir}"/* . | ||
| # Optionally remove the now-empty subdir and the extract_dir | ||
| rmdir "${first_subdir}" | ||
| rmdir "${extract_dir}" |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar.xz) tar --no-same-owner -xJf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar.bz2) tar --no-same-owner -xjf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar) tar --no-same-owner -xf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.gz) gunzip "${tarball}" ;; | |
| *.zip) | |
| # unzip doesn't have a standard --strip-components | |
| # Workaround: extract to a subdir and move contents up if stripping | |
| if [ "$strip_components" -gt 0 ]; then | |
| extract_dir=$(basename "${tarball%.zip}")_extracted | |
| unzip -q "${tarball}" -d "${extract_dir}" | |
| # Move contents of the *first* directory found inside extract_dir up | |
| # This assumes wrap_in_directory=true convention | |
| first_subdir=$(find "${extract_dir}" -mindepth 1 -maxdepth 1 -type d -print -quit) | |
| if [ -n "$first_subdir" ]; then | |
| # Move all contents (* includes hidden files) | |
| mv "${first_subdir}"/* . | |
| # Optionally remove the now-empty subdir and the extract_dir | |
| rmdir "${first_subdir}" | |
| rmdir "${extract_dir}" | |
| *.tar.gz | *.tgz) tar --no-same-owner -xzf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar.xz) tar --no-same-owner -xJf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar.bz2) tar --no-same-owner -xjf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.tar) tar --no-same-owner -xf "${tarball}" --strip-components "${strip_components}" ;; | |
| *.gz) gunzip "${tarball}" ;; | |
| *.zip) | |
| # unzip doesn't have a standard --strip-components | |
| # Workaround: extract to a subdir and move contents up if stripping | |
| if [ "$strip_components" -gt 0 ]; then | |
| extract_dir=$(basename "${tarball%.zip}")_extracted | |
| unzip -q "${tarball}" -d "${extract_dir}" | |
| # Move contents of the *first* directory found inside extract_dir up | |
| # This assumes wrap_in_directory=true convention | |
| first_subdir=$(find "${extract_dir}" -mindepth 1 -maxdepth 1 -type d -print -quit) | |
| if [ -n "$first_subdir" ]; then | |
| # Move all contents (* includes hidden files) | |
| mv "${first_subdir}"/* . | |
| # Optionally remove the now-empty subdir and the extract_dir | |
| rmdir "${first_subdir}" | |
| rmdir "${extract_dir}" | |
| else | |
| log_warn "Could not find subdirectory in zip to strip components from ${extract_dir}" | |
| # Files are extracted in current dir anyway, proceed | |
| fi |
| log_warn "Could not find subdirectory in zip to strip components from ${extract_dir}" | ||
| # Files are extracted in current dir anyway, proceed |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| log_warn "Could not find subdirectory in zip to strip components from ${extract_dir}" | |
| # Files are extracted in current dir anyway, proceed | |
| unzip -q "${tarball}" |
| else | ||
| unzip -q "${tarball}" | ||
| fi | ||
| ;; | ||
| *) | ||
| log_err "untar unknown archive format for ${tarball}" | ||
| return 1 | ||
| ;; |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| else | |
| unzip -q "${tarball}" | |
| fi | |
| ;; | |
| *) | |
| log_err "untar unknown archive format for ${tarball}" | |
| return 1 | |
| ;; | |
| ;; | |
| *) | |
| log_err "untar unknown archive format for ${tarball}" | |
| return 1 | |
| ;; |
|
|
||
|
|
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| chmod +x "${BINARY_PATH}" | ||
| # Run the binary directly with provided arguments | ||
| log_info "Running ${BINARY_NAME}${TOOL_ARGS:+ with arguments:$TOOL_ARGS}" | ||
| exec "${BINARY_PATH}" $TOOL_ARGS |
There was a problem hiding this comment.
[shellcheck (suggestion)] reported by reviewdog 🐶
| exec "${BINARY_PATH}" $TOOL_ARGS | |
| exec "${BINARY_PATH}" "$TOOL_ARGS" |
85cea3a to
71ad8e7
Compare
| if [ "$line_filename" = "$BASENAME" ]; then | ||
| return 0 | ||
| fi | ||
| done < "$SUMFILE" |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| done < "$SUMFILE" | |
| done <"$SUMFILE" |
| -d) log_set_priority 10 ;; | ||
| -h | --help | \?) usage "$0" ;; | ||
| -x) set -x ;; | ||
| --) | ||
| SEPARATOR_FOUND=1 | ||
| shift | ||
| break | ||
| ;; | ||
| -*) | ||
| usage "$0" | ||
| ;; | ||
| *) | ||
| if [ $SEPARATOR_FOUND -eq 0 ]; then | ||
| # First non-flag argument is the tag/version | ||
| TAG="$1" | ||
| else | ||
| TOOL_ARGS="$1 $TOOL_ARGS" | ||
| fi | ||
| ;; |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| -d) log_set_priority 10 ;; | |
| -h | --help | \?) usage "$0" ;; | |
| -x) set -x ;; | |
| --) | |
| SEPARATOR_FOUND=1 | |
| shift | |
| break | |
| ;; | |
| -*) | |
| usage "$0" | |
| ;; | |
| *) | |
| if [ $SEPARATOR_FOUND -eq 0 ]; then | |
| # First non-flag argument is the tag/version | |
| TAG="$1" | |
| else | |
| TOOL_ARGS="$1 $TOOL_ARGS" | |
| fi | |
| ;; | |
| -d) log_set_priority 10 ;; | |
| -h | --help | \?) usage "$0" ;; | |
| -x) set -x ;; | |
| --) | |
| SEPARATOR_FOUND=1 | |
| shift | |
| break | |
| ;; | |
| -*) | |
| usage "$0" | |
| ;; | |
| *) | |
| if [ $SEPARATOR_FOUND -eq 0 ]; then | |
| # First non-flag argument is the tag/version | |
| TAG="$1" | |
| else | |
| TOOL_ARGS="$1 $TOOL_ARGS" | |
| fi | |
| ;; |
| log_info "Resolved version: ${VERSION} (tag: ${TAG})" | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| if [ "${UNAME_ARCH}" = 'amd64' ] && true | ||
| then |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| if [ "${UNAME_ARCH}" = 'amd64' ] && true | |
| then | |
| if [ "${UNAME_ARCH}" = 'amd64' ] && true; then |
| if [ "${UNAME_ARCH}" = '386' ] && true | ||
| then |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| if [ "${UNAME_ARCH}" = '386' ] && true | |
| then | |
| if [ "${UNAME_ARCH}" = '386' ] && true; then |
| if [ "${UNAME_OS}" = 'windows' ] && true | ||
| then |
There was a problem hiding this comment.
[shfmt] reported by reviewdog 🐶
| if [ "${UNAME_OS}" = 'windows' ] && true | |
| then | |
| if [ "${UNAME_OS}" = 'windows' ] && true; then |
|
🏷️ [bumpr] Next version:v1.4.0 Changes:v1.3.2...reviewdog:update-installer-script |
|
🚀 [bumpr] Bumped! New version:v1.4.0 Changes:v1.3.2...v1.4.0 |
No description provided.