Skip to content

Commit

Permalink
fix: Fix list-all
Browse files Browse the repository at this point in the history
There were two issues:
- the wrong function from shell-gr was called
- sorting version cases an issue (shell-gr update needed)
  • Loading branch information
rynkowsg committed Apr 12, 2024
1 parent b89b2c4 commit 2c5d280
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions @bin/format.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"}"
Expand Down
4 changes: 2 additions & 2 deletions @bin/lint.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions bin/latest-stable
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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 "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2c5d280

Please sign in to comment.