From 2c5d28017a42edb93e7e52979d7f09e19a880a7b Mon Sep 17 00:00:00 2001 From: Greg Rynkowski <5878299+rynkowsg@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:22:01 -0300 Subject: [PATCH] fix: Fix list-all There were two issues: - the wrong function from shell-gr was called - sorting version cases an issue (shell-gr update needed) --- @bin/format.bash | 4 ++-- @bin/lint.bash | 4 ++-- bin/download | 8 ++++---- bin/install | 8 ++++---- bin/latest-stable | 6 +++--- bin/list-all | 8 ++++---- .../lib/checksum.bash | 0 .../{shell-gr@1a30383 => shell-gr@1047322}/lib/color.bash | 0 .../{shell-gr@1a30383 => shell-gr@1047322}/lib/debug.bash | 0 .../{shell-gr@1a30383 => shell-gr@1047322}/lib/error.bash | 0 .../lib/install/clj_kondo.bash | 0 .../lib/install/common/github.bash | 6 ++++-- .../{shell-gr@1a30383 => shell-gr@1047322}/lib/log.bash | 0 .../{shell-gr@1a30383 => shell-gr@1047322}/lib/os.bash | 0 .../{shell-gr@1a30383 => shell-gr@1047322}/lib/temp.bash | 0 .../{shell-gr@1a30383 => shell-gr@1047322}/lib/trap.bash | 0 16 files changed, 23 insertions(+), 21 deletions(-) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/checksum.bash (100%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/color.bash (100%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/debug.bash (100%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/error.bash (100%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/install/clj_kondo.bash (100%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/install/common/github.bash (95%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/log.bash (100%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/os.bash (100%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/temp.bash (100%) rename lib/.github_deps/rynkowsg/{shell-gr@1a30383 => shell-gr@1047322}/lib/trap.bash (100%) diff --git a/@bin/format.bash b/@bin/format.bash index f7fdf7e..778a7eb 100755 --- a/@bin/format.bash +++ b/@bin/format.bash @@ -18,9 +18,9 @@ set -euo pipefail # Path Initialization SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P || exit 1)" ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd -P || exit 1)" -export SHELL_GR_DIR="${ROOT_DIR}/.github_deps/rynkowsg/shell-gr@1a30383" # needed for shell-gr to resolve paths +export SHELL_GR_DIR="${ROOT_DIR}/.github_deps/rynkowsg/shell-gr@1047322" # needed for shell-gr to resolve paths # Library Sourcing -source "${ROOT_DIR}/.github_deps/rynkowsg/shell-gr@1a30383/lib/tool/format.bash" # format_with_env +source "${ROOT_DIR}/.github_deps/rynkowsg/shell-gr@1047322/lib/tool/format.bash" # format_with_env main() { local format_cmd_type="${1:-"apply"}" diff --git a/@bin/lint.bash b/@bin/lint.bash index 3248be0..18e6926 100755 --- a/@bin/lint.bash +++ b/@bin/lint.bash @@ -17,9 +17,9 @@ set -euo pipefail # Path Initialization SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P || exit 1)" ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd -P || exit 1)" -export SHELL_GR_DIR="${ROOT_DIR}/.github_deps/rynkowsg/shell-gr@1a30383" # needed for shell-gr to resolve paths +export SHELL_GR_DIR="${ROOT_DIR}/.github_deps/rynkowsg/shell-gr@1047322" # needed for shell-gr to resolve paths # Library Sourcing -source "${ROOT_DIR}/.github_deps/rynkowsg/shell-gr@1a30383/lib/tool/lint.bash" # lint +source "${ROOT_DIR}/.github_deps/rynkowsg/shell-gr@1047322/lib/tool/lint.bash" # lint main() { local error=0 diff --git a/bin/download b/bin/download index 7a72fca..55a15e1 100755 --- a/bin/download +++ b/bin/download @@ -20,12 +20,12 @@ if [ -z "${SHELL_GR_DIR:-}" ]; then SCRIPT_PATH="$([[ ! "${SCRIPT_PATH_1}" =~ /bash$ ]] && readlink -f "${SCRIPT_PATH_1}" || echo "")" SCRIPT_DIR="$([ -n "${SCRIPT_PATH}" ] && (cd "$(dirname "${SCRIPT_PATH}")" && pwd -P) || echo "")" ROOT_DIR="$([ -n "${SCRIPT_DIR}" ] && (cd "${SCRIPT_DIR}/.." && pwd -P) || echo "/tmp")" - export SHELL_GR_DIR="${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383" # needed for shell-gr to resolve paths + export SHELL_GR_DIR="${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322" # needed for shell-gr to resolve paths fi # Library Sourcing -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/error.bash" # fail -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/log.bash" # log_debug -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/clj_kondo.bash" # GRI_CLJ_KONDO__download +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/error.bash" # fail +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/log.bash" # log_debug +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/clj_kondo.bash" # GRI_CLJ_KONDO__download # `bin/download` spec: https://github.com/asdf-vm/asdf/blob/master/docs/plugins/create.md#bindownload- main() { diff --git a/bin/install b/bin/install index 6c9fd64..2fb62a4 100755 --- a/bin/install +++ b/bin/install @@ -20,12 +20,12 @@ if [ -z "${SHELL_GR_DIR:-}" ]; then SCRIPT_PATH="$([[ ! "${SCRIPT_PATH_1}" =~ /bash$ ]] && readlink -f "${SCRIPT_PATH_1}" || echo "")" SCRIPT_DIR="$([ -n "${SCRIPT_PATH}" ] && (cd "$(dirname "${SCRIPT_PATH}")" && pwd -P) || echo "")" ROOT_DIR="$([ -n "${SCRIPT_DIR}" ] && (cd "${SCRIPT_DIR}/.." && pwd -P) || echo "/tmp")" - export SHELL_GR_DIR="${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383" # needed for shell-gr to resolve paths + export SHELL_GR_DIR="${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322" # needed for shell-gr to resolve paths fi # Library Sourcing -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/error.bash" # fail -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/clj_kondo.bash" # GRI_CLJ_KONDO__install_downloaded -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/log.bash" # log_debug +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/error.bash" # fail +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/clj_kondo.bash" # GRI_CLJ_KONDO__install_downloaded +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/log.bash" # log_debug # `bin/install` spec: https://github.com/asdf-vm/asdf/blob/master/docs/plugins/create.md#bininstall- main() { diff --git a/bin/latest-stable b/bin/latest-stable index 21c264a..ec1ad90 100755 --- a/bin/latest-stable +++ b/bin/latest-stable @@ -21,11 +21,11 @@ if [ -z "${SHELL_GR_DIR:-}" ]; then SCRIPT_PATH="$([[ ! "${SCRIPT_PATH_1}" =~ /bash$ ]] && readlink -f "${SCRIPT_PATH_1}" || echo "")" SCRIPT_DIR="$([ -n "${SCRIPT_PATH}" ] && (cd "$(dirname "${SCRIPT_PATH}")" && pwd -P) || echo "")" ROOT_DIR="$([ -n "${SCRIPT_DIR}" ] && (cd "${SCRIPT_DIR}/.." && pwd -P) || echo "/tmp")" - export SHELL_GR_DIR="${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383" # needed for shell-gr to resolve paths + export SHELL_GR_DIR="${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322" # needed for shell-gr to resolve paths fi # Library Sourcing -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/clj_kondo.bash" # GRI_CLJ_KONDO__latest_stable -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/log.bash" # log_debug +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/clj_kondo.bash" # GRI_CLJ_KONDO__latest_stable +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/log.bash" # log_debug # `bin/latest-stable` spec: https://github.com/asdf-vm/asdf/blob/master/docs/plugins/create.md#binlatest-stable- main() { diff --git a/bin/list-all b/bin/list-all index a1c3473..11e298e 100755 --- a/bin/list-all +++ b/bin/list-all @@ -20,11 +20,11 @@ if [ -z "${SHELL_GR_DIR:-}" ]; then SCRIPT_PATH="$([[ ! "${SCRIPT_PATH_1}" =~ /bash$ ]] && readlink -f "${SCRIPT_PATH_1}" || echo "")" SCRIPT_DIR="$([ -n "${SCRIPT_PATH}" ] && (cd "$(dirname "${SCRIPT_PATH}")" && pwd -P) || echo "")" ROOT_DIR="$([ -n "${SCRIPT_DIR}" ] && (cd "${SCRIPT_DIR}/.." && pwd -P) || echo "/tmp")" - export SHELL_GR_DIR="${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383" # needed for shell-gr to resolve paths + export SHELL_GR_DIR="${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322" # needed for shell-gr to resolve paths fi # Library Sourcing -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/clj_kondo.bash" # GRI_CLJ_KONDO__list_all_versions -source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/log.bash" # log_debug +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/clj_kondo.bash" # GRI_CLJ_KONDO__list_all_versions +source "${ROOT_DIR}/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/log.bash" # log_debug # `bin/list-all` spec: https://github.com/asdf-vm/asdf/blob/master/docs/plugins/create.md#binlist-all- main() { @@ -36,7 +36,7 @@ main() { log_debug "ASDF_INSTALL_VERSION: ${ASDF_INSTALL_VERSION:-}" log_debug "ASDF_INSTALL_PATH: ${ASDF_INSTALL_PATH:-}" - GRI_CLJ_KONDO__latest_stable + GRI_CLJ_KONDO__list_all_versions } main "$@" diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/checksum.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/checksum.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/checksum.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/checksum.bash diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/color.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/color.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/color.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/color.bash diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/debug.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/debug.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/debug.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/debug.bash diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/error.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/error.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/error.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/error.bash diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/clj_kondo.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/clj_kondo.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/clj_kondo.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/clj_kondo.bash diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/common/github.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/common/github.bash similarity index 95% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/common/github.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/common/github.bash index 423f0cf..28920f8 100644 --- a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/install/common/github.bash +++ b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/install/common/github.bash @@ -17,9 +17,11 @@ source "${_SHELL_GR_DIR}/lib/error.bash" # assert_not_empty GRIC_GH_sort_versions() { # input: version lists on stdin - sed 'h; s/[+-]/./g; s/.p\([[:digit:]]\)/.z\1/; s/$/.z/; G; s/\n/ /' \ + tr ' ' '\n' \ + | sed 'h; s/[+-]/./g; s/.p\([[:digit:]]\)/.z\1/; s/$/.z/; G; s/\n/ /' \ | LC_ALL=C sort -t. -k 1,1 -k 2,2n -k 3,3n -k 4,4n -k 5,5n \ - | awk '{print $2}' + | awk '{print $2}' \ + | tr '\n' ' ' } GRIC_GH_list_github_tags() { diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/log.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/log.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/log.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/log.bash diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/os.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/os.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/os.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/os.bash diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/temp.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/temp.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/temp.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/temp.bash diff --git a/lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/trap.bash b/lib/.github_deps/rynkowsg/shell-gr@1047322/lib/trap.bash similarity index 100% rename from lib/.github_deps/rynkowsg/shell-gr@1a30383/lib/trap.bash rename to lib/.github_deps/rynkowsg/shell-gr@1047322/lib/trap.bash