From caedf271e8c2fafe4a1b898cbbe45570347cf743 Mon Sep 17 00:00:00 2001 From: Daniele Franceschi Date: Sun, 23 Nov 2025 22:52:09 +0100 Subject: [PATCH 1/7] feat: add wget support --- gah | 45 ++++++++++++++++++++++++---- test/02_github_api_functions.bats | 2 ++ test/03_test_release__error.bats | 5 ++++ test/03_test_release_age.bats | 1 + test/03_test_release_argocd.bats | 1 + test/03_test_release_bottom.bats | 1 + test/03_test_release_devbox.bats | 1 + test/03_test_release_dive.bats | 1 + test/03_test_release_duckdb.bats | 1 + test/03_test_release_fd.bats | 1 + test/03_test_release_fx.bats | 1 + test/03_test_release_fzf.bats | 1 + test/03_test_release_gdu.bats | 1 + test/03_test_release_genact.bats | 1 + test/03_test_release_gh.bats | 1 + test/03_test_release_git-sizer.bats | 1 + test/03_test_release_goss.bats | 1 + test/03_test_release_gping.bats | 1 + test/03_test_release_helm.bats | 1 + test/03_test_release_helmfile.bats | 1 + test/03_test_release_jsonschema.bats | 1 + test/03_test_release_k9s.bats | 1 + test/03_test_release_kind.bats | 1 + test/03_test_release_kops.bats | 1 + test/03_test_release_lazydocker.bats | 1 + test/03_test_release_lazygit.bats | 1 + test/03_test_release_odin.bats | 1 + test/03_test_release_sops.bats | 1 + test/03_test_release_terragrunt.bats | 1 + test/03_test_release_trufflehog.bats | 1 + test/03_test_release_yazi.bats | 1 + test/03_test_release_yq.bats | 1 + test/03_test_release_zoxide.bats | 1 + tools/install.sh | 22 ++++++++++++-- 34 files changed, 96 insertions(+), 8 deletions(-) diff --git a/gah b/gah index f5b2ca0..f477aeb 100755 --- a/gah +++ b/gah @@ -71,13 +71,48 @@ function cleanup() { fi } +function http_get() { + local url="$1" + # if curl is available, use it, otherwise use wget. + if command -v curl >/dev/null 2>&1; then + curl -s "${GITHUB_AUTH_ARGS[@]}" "$url" + else + wget -qO- "${GITHUB_AUTH_ARGS[@]}" "$url" + fi +} + +function http_download() { + local url="$1" + local destination="$2" + local silent="$3" + local progress="$4" + # if curl is available, use it, otherwise use wget. + if command -v curl >/dev/null 2>&1; then + [[ $silent == "true" ]] && silent_option="-s" || silent_option="" + [[ $progress == "true" ]] && progress_option="--progress-bar" || progress_option="" + curl ${silent_option} -L ${progress_option} "${GITHUB_AUTH_ARGS[@]}" -o "$destination" "$url" + else + # detect if wget is from alpine/busybox or a GNU wget + if wget --version >/dev/null 2>&1; then + local is_gnu_wget="true" + else + local is_gnu_wget="false" + fi + local wget_progress_option + local silent_option + [[ $silent == "true" ]] && silent_option="-q" || silent_option="" + [[ $progress == "true" && $is_gnu_wget == "true" ]] && progress_option="--show-progress" || progress_option="" + wget ${silent_option} ${progress_option} "${GITHUB_AUTH_ARGS[@]}" -O "$destination" "$url" + fi +} + #endregion #-------------------------------------------------- #region GitHub Authentication # Setup GitHub authentication if GITHUB_PAT is provided if [[ -n "${GITHUB_PAT:-}" ]]; then - GITHUB_AUTH_ARGS=(-H "Authorization: token ${GITHUB_PAT}") + GITHUB_AUTH_ARGS=(--header "Authorization: token ${GITHUB_PAT}") print_green "Using GitHub Personal Access Token for API requests" else GITHUB_AUTH_ARGS=() @@ -173,7 +208,7 @@ function fetch_release_info() { local url=$(get_fetch_release_info_url "$1" "$2") print_debug "Fetching release information from: $url" - curl -s "${GITHUB_AUTH_ARGS[@]}" "$url" > release.json + http_get "$url" > release.json # Validate that we got a valid JSON response if [[ ! -s release.json ]]; then @@ -322,7 +357,7 @@ function verify_digest() { function fetch_db() { print_debug "Fetching DB" - curl -s "https://raw.githubusercontent.com/get-gah/gah-db/refs/heads/master/db.json" > "$GAH_DB_FILE" + http_get "https://raw.githubusercontent.com/get-gah/gah-db/refs/heads/master/db.json" > "$GAH_DB_FILE" } function get_db_path() { @@ -443,7 +478,7 @@ function command_install() { # Download the file print_blue "Downloading: $filename" - curl -L --progress-bar -o "$filename" "$download_url" + http_download "$download_url" "$filename" true true # Verify the download if digest is available print_debug "Verifying download digest if available" @@ -552,7 +587,7 @@ function command_update() { fi # Download gah! script - curl -sL https://raw.githubusercontent.com/$gah_repo/refs/tags/$tag/gah -o "$script_realpath" + http_download "https://raw.githubusercontent.com/$gah_repo/refs/tags/$tag/gah" "$script_realpath" true false chmod +x "$script_realpath" print_green "OK" diff --git a/test/02_github_api_functions.bats b/test/02_github_api_functions.bats index 916f766..629f679 100644 --- a/test/02_github_api_functions.bats +++ b/test/02_github_api_functions.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "get_fetch_release_info_url should print the correct URL if no version is provided" { @@ -43,6 +44,7 @@ teardown() { @test "fetch_release_info should save the release info to a file" { stub curl "-s * : cat '$DIR/test/fixtures/releases/argocd/release.json'" + stub wget "-q * : cat '$DIR/test/fixtures/releases/argocd/release.json'" TEST_TEMP_DIR=$(mktemp -d) cd "$TEST_TEMP_DIR" diff --git a/test/03_test_release__error.bats b/test/03_test_release__error.bats index d920fc4..99c41f6 100644 --- a/test/03_test_release__error.bats +++ b/test/03_test_release__error.bats @@ -18,10 +18,12 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "fetch_release_info should print an network error message if the release info cannot be fetched" { stub curl "-s * : touch release.json" + stub wget "-q * : touch release.json" TEST_TEMP_DIR=$(mktemp -d) cd "$TEST_TEMP_DIR" @@ -35,6 +37,7 @@ teardown() { @test "fetch_release_info should print an json error message if the release info is not valid json" { stub curl "-s * : echo 'not a json'" + stub wget "-q * : echo 'not a json'" TEST_TEMP_DIR=$(mktemp -d) cd "$TEST_TEMP_DIR" @@ -48,6 +51,7 @@ teardown() { @test "fetch_release_info should print an rate limit error message if the response indicates rate limiting" { stub curl "-s * : cat '$DIR/test/fixtures/releases/_error/rate_limit_release.json'" + stub wget "-q * : cat '$DIR/test/fixtures/releases/_error/rate_limit_release.json'" TEST_TEMP_DIR=$(mktemp -d) cd "$TEST_TEMP_DIR" @@ -65,6 +69,7 @@ teardown() { @test "fetch_release_info should print an error message if the release info contains some other error" { stub curl "-s * : cat '$DIR/test/fixtures/releases/_error/teapot_release.json'" + stub wget "-q * : cat '$DIR/test/fixtures/releases/_error/teapot_release.json'" TEST_TEMP_DIR=$(mktemp -d) cd "$TEST_TEMP_DIR" diff --git a/test/03_test_release_age.bats b/test/03_test_release_age.bats index b90528d..38bd496 100644 --- a/test/03_test_release_age.bats +++ b/test/03_test_release_age.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_argocd.bats b/test/03_test_release_argocd.bats index e5724e8..d23f6c5 100644 --- a/test/03_test_release_argocd.bats +++ b/test/03_test_release_argocd.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_bottom.bats b/test/03_test_release_bottom.bats index 8ae4545..46c45a4 100644 --- a/test/03_test_release_bottom.bats +++ b/test/03_test_release_bottom.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_devbox.bats b/test/03_test_release_devbox.bats index 338ac51..fb46593 100644 --- a/test/03_test_release_devbox.bats +++ b/test/03_test_release_devbox.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_dive.bats b/test/03_test_release_dive.bats index b486c6d..908408d 100644 --- a/test/03_test_release_dive.bats +++ b/test/03_test_release_dive.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_duckdb.bats b/test/03_test_release_duckdb.bats index d4ec3c6..3935977 100644 --- a/test/03_test_release_duckdb.bats +++ b/test/03_test_release_duckdb.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_fd.bats b/test/03_test_release_fd.bats index 8b95d8b..b8b284d 100644 --- a/test/03_test_release_fd.bats +++ b/test/03_test_release_fd.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_fx.bats b/test/03_test_release_fx.bats index cec9b48..336bc72 100644 --- a/test/03_test_release_fx.bats +++ b/test/03_test_release_fx.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_fzf.bats b/test/03_test_release_fzf.bats index c575a7b..62d3524 100644 --- a/test/03_test_release_fzf.bats +++ b/test/03_test_release_fzf.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_gdu.bats b/test/03_test_release_gdu.bats index e7eee9f..1c7b6ed 100644 --- a/test/03_test_release_gdu.bats +++ b/test/03_test_release_gdu.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_genact.bats b/test/03_test_release_genact.bats index ef957cd..e5b0b86 100644 --- a/test/03_test_release_genact.bats +++ b/test/03_test_release_genact.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_gh.bats b/test/03_test_release_gh.bats index fc21700..e76fbfd 100644 --- a/test/03_test_release_gh.bats +++ b/test/03_test_release_gh.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_git-sizer.bats b/test/03_test_release_git-sizer.bats index 4f85ff5..a49a274 100644 --- a/test/03_test_release_git-sizer.bats +++ b/test/03_test_release_git-sizer.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_goss.bats b/test/03_test_release_goss.bats index 6cebc7d..cd0ef7b 100644 --- a/test/03_test_release_goss.bats +++ b/test/03_test_release_goss.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_gping.bats b/test/03_test_release_gping.bats index 68a0034..09885a5 100644 --- a/test/03_test_release_gping.bats +++ b/test/03_test_release_gping.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_helm.bats b/test/03_test_release_helm.bats index 4eb4016..1bf34a8 100644 --- a/test/03_test_release_helm.bats +++ b/test/03_test_release_helm.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_helmfile.bats b/test/03_test_release_helmfile.bats index 401afdd..5e0985f 100644 --- a/test/03_test_release_helmfile.bats +++ b/test/03_test_release_helmfile.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_jsonschema.bats b/test/03_test_release_jsonschema.bats index 6c56419..9655882 100644 --- a/test/03_test_release_jsonschema.bats +++ b/test/03_test_release_jsonschema.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_k9s.bats b/test/03_test_release_k9s.bats index ce54aec..8bfda7c 100644 --- a/test/03_test_release_k9s.bats +++ b/test/03_test_release_k9s.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_kind.bats b/test/03_test_release_kind.bats index 2781234..b75c9d1 100644 --- a/test/03_test_release_kind.bats +++ b/test/03_test_release_kind.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_kops.bats b/test/03_test_release_kops.bats index 45d4ee5..3c30054 100644 --- a/test/03_test_release_kops.bats +++ b/test/03_test_release_kops.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_lazydocker.bats b/test/03_test_release_lazydocker.bats index 345971a..822918d 100644 --- a/test/03_test_release_lazydocker.bats +++ b/test/03_test_release_lazydocker.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_lazygit.bats b/test/03_test_release_lazygit.bats index 2b3c84d..1f1bc91 100644 --- a/test/03_test_release_lazygit.bats +++ b/test/03_test_release_lazygit.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_odin.bats b/test/03_test_release_odin.bats index b0d54d0..bf308ac 100644 --- a/test/03_test_release_odin.bats +++ b/test/03_test_release_odin.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_sops.bats b/test/03_test_release_sops.bats index 340fa68..0648304 100644 --- a/test/03_test_release_sops.bats +++ b/test/03_test_release_sops.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_terragrunt.bats b/test/03_test_release_terragrunt.bats index 3a33fc4..f3588f3 100644 --- a/test/03_test_release_terragrunt.bats +++ b/test/03_test_release_terragrunt.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_trufflehog.bats b/test/03_test_release_trufflehog.bats index cb9c49a..02f0597 100644 --- a/test/03_test_release_trufflehog.bats +++ b/test/03_test_release_trufflehog.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_yazi.bats b/test/03_test_release_yazi.bats index 0191e07..c64898c 100644 --- a/test/03_test_release_yazi.bats +++ b/test/03_test_release_yazi.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_yq.bats b/test/03_test_release_yq.bats index f75a5f6..3121cdc 100644 --- a/test/03_test_release_yq.bats +++ b/test/03_test_release_yq.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/test/03_test_release_zoxide.bats b/test/03_test_release_zoxide.bats index fddb969..e249a4c 100644 --- a/test/03_test_release_zoxide.bats +++ b/test/03_test_release_zoxide.bats @@ -18,6 +18,7 @@ teardown() { unstub uname || true unstub curl || true + unstub wget || true } @test "find_download_url should print match for the correct asset [linux/amd64]" { diff --git a/tools/install.sh b/tools/install.sh index e834f7d..da544f0 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -57,7 +57,7 @@ print_green "OK" # Check if required commands are installed require_command tar require_command unzip -require_command curl +require_command curl || require_command wget require_command jq require_command openssl @@ -74,14 +74,30 @@ else print_green "OK, looks good!" fi +if [[ -n "${GITHUB_PAT:-}" ]]; then + GITHUB_AUTH_ARGS=(--header "Authorization: token ${GITHUB_PAT}") + print_green "Using GitHub Personal Access Token for API requests" +else + GITHUB_AUTH_ARGS=() + print_yellow "No GITHUB_PAT found - using unauthenticated GitHub API (rate limited to 60 requests/hour)" +fi + # Check gah latest tag print_blue "Checking latest gah release..." -tag=$(curl -s https://api.github.com/repos/get-gah/gah/releases/latest | jq -r '.tag_name') +if command -v curl >/dev/null 2>&1; then + tag=$(curl -s "${GITHUB_AUTH_ARGS[@]}" https://api.github.com/repos/get-gah/gah/releases/latest | jq -r '.tag_name') +else + tag=$(wget -q "${GITHUB_AUTH_ARGS[@]}" -O - https://api.github.com/repos/get-gah/gah/releases/latest | jq -r '.tag_name') +fi print_green "OK, latest tag is $tag" # Download gah! script print_blue "Downloading gah $tag script..." -curl -sL https://raw.githubusercontent.com/get-gah/gah/refs/tags/$tag/gah -o "$GAH_INSTALL_DIR/gah" +if command -v curl >/dev/null 2>&1; then + curl -sL https://raw.githubusercontent.com/get-gah/gah/refs/tags/$tag/gah -o "$GAH_INSTALL_DIR/gah" +else + wget -q https://raw.githubusercontent.com/get-gah/gah/refs/tags/$tag/gah -O "$GAH_INSTALL_DIR/gah" +fi chmod +x "$GAH_INSTALL_DIR/gah" print_green "OK" From 2427317b0a9e70b621c4025179aa01b6cbc22436 Mon Sep 17 00:00:00 2001 From: Daniele Franceschi Date: Sun, 23 Nov 2025 22:52:40 +0100 Subject: [PATCH 2/7] docs: update README with dependencies --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 5c53b0e..b025731 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,24 @@ Nowadays more and more command-line tools and applications are distributed via G - 🗃 Has own base of predefined aliases for GitHub repositories (PRs are welcome!) - 🔐 Verifies downloaded files using provided by `openssl` against [asset's digest value](https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#get-a-release-asset) +## Requirements + +- `bash` (but also works in `ash`) +- `jq` +- `curl` or `wget` +- `tar` +- `unzip` +- `openssl` + ## Installation ```bash bash -c "$(curl -fsSL https://raw.githubusercontent.com/get-gah/gah/refs/heads/master/tools/install.sh)" ``` +or +```bash +bash -c "$(wget -qO- https://raw.githubusercontent.com/get-gah/gah/refs/heads/master/tools/install.sh)" +``` ## Usage From 3e75a42e0bb75a6da44b56b4bad7c20db238e504 Mon Sep 17 00:00:00 2001 From: Daniele Franceschi Date: Sun, 23 Nov 2025 22:52:57 +0100 Subject: [PATCH 3/7] build: add integration tests in alpine and debian --- .github/workflows/test.yaml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fdca72e..ec683bd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,3 +18,41 @@ jobs: - name: Test shell: bash run: ./test/bats/bin/bats ./test + + integration-alpine: + needs: test + runs-on: ubuntu-latest + container: library/alpine:3 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + - name: Install dependencies + run: apk add jq openssl bash + - name: Test + shell: bash + run: ./test/bats/bin/bats ./test + - name: Install something + shell: bash + run: ./gah install mikefarah/yq --unattended + - name: Test if yq was installed correctly + run: yq --version + + integration-debian: + needs: test + runs-on: ubuntu-latest + container: library/debian:13-slim + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + - name: Install dependencies + run: apt-get update && apt-get install -y jq openssl curl + - name: Test + run: ./test/bats/bin/bats ./test + - name: Install something + run: ./gah install mikefarah/yq --unattended + - name: Test if yq was installed correctly + run: yq --version From ec956297c75a928f8eb4de46ec77ddc5d4b64b13 Mon Sep 17 00:00:00 2001 From: Daniele Franceschi Date: Sun, 23 Nov 2025 23:10:06 +0100 Subject: [PATCH 4/7] fix: wget cli for tests --- gah | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gah b/gah index f477aeb..b35ab62 100755 --- a/gah +++ b/gah @@ -77,7 +77,7 @@ function http_get() { if command -v curl >/dev/null 2>&1; then curl -s "${GITHUB_AUTH_ARGS[@]}" "$url" else - wget -qO- "${GITHUB_AUTH_ARGS[@]}" "$url" + wget -q -O- "${GITHUB_AUTH_ARGS[@]}" "$url" fi } From 6a9fd728e652358d9e4eb758fdb96987fa19bae0 Mon Sep 17 00:00:00 2001 From: Daniele Franceschi Date: Sun, 23 Nov 2025 23:20:55 +0100 Subject: [PATCH 5/7] docs: remove references to ash --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b025731..19d4c0f 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Nowadays more and more command-line tools and applications are distributed via G ## Requirements -- `bash` (but also works in `ash`) +- `bash` - `jq` - `curl` or `wget` - `tar` From fe399b28a11b59b5f206042dc35efeed30a29d25 Mon Sep 17 00:00:00 2001 From: Daniele Franceschi Date: Sun, 23 Nov 2025 23:23:23 +0100 Subject: [PATCH 6/7] fix: fix installation script --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index da544f0..211460a 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -87,7 +87,7 @@ print_blue "Checking latest gah release..." if command -v curl >/dev/null 2>&1; then tag=$(curl -s "${GITHUB_AUTH_ARGS[@]}" https://api.github.com/repos/get-gah/gah/releases/latest | jq -r '.tag_name') else - tag=$(wget -q "${GITHUB_AUTH_ARGS[@]}" -O - https://api.github.com/repos/get-gah/gah/releases/latest | jq -r '.tag_name') + tag=$(wget -q "${GITHUB_AUTH_ARGS[@]}" -O- https://api.github.com/repos/get-gah/gah/releases/latest | jq -r '.tag_name') fi print_green "OK, latest tag is $tag" From 25974c9441cbfcba26af3146591fe9ad97138322 Mon Sep 17 00:00:00 2001 From: Daniele Franceschi Date: Mon, 24 Nov 2025 12:20:13 +0100 Subject: [PATCH 7/7] build: fix submodule checkout in containerized job --- .github/workflows/test.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ec683bd..ae35edb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,12 +24,12 @@ jobs: runs-on: ubuntu-latest container: library/alpine:3 steps: + - name: Install dependencies + run: apk add jq openssl bash git - name: Checkout uses: actions/checkout@v4 with: submodules: true - - name: Install dependencies - run: apk add jq openssl bash - name: Test shell: bash run: ./test/bats/bin/bats ./test @@ -44,12 +44,12 @@ jobs: runs-on: ubuntu-latest container: library/debian:13-slim steps: + - name: Install dependencies + run: apt-get update && apt-get install -y jq openssl curl git - name: Checkout uses: actions/checkout@v4 with: submodules: true - - name: Install dependencies - run: apt-get update && apt-get install -y jq openssl curl - name: Test run: ./test/bats/bin/bats ./test - name: Install something