Skip to content

Commit

Permalink
Fix install script (#37)
Browse files Browse the repository at this point in the history
* Fix install script

Upstream started using the `.tgz` extension instead of the `.tar.gz` extension, so this script is broken as of writing

* Fix additional usage of old extension

* update ci

* update more runner versions

* fix lint error

* try macos-12

* disable vagrant tests for now

---------

Co-authored-by: Ben "Fuzzy" Shonaldmann <[email protected]>
Co-authored-by: Ben Weissmann <[email protected]>
  • Loading branch information
3 people authored Aug 28, 2024
1 parent 66047d7 commit 2bea87c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
62 changes: 32 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-18.04
- macos-10.15
- ubuntu-24.04
- macos-12
- windows-2022
update_alternatives:
- y
Expand All @@ -34,42 +34,47 @@ jobs:

lint:
name: Lint
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
steps:
- name: Check out code
uses: actions/checkout@v1

- name: Lint
run: |
command -v apt-get >/dev/null 2>&1 && sudo apt-get update && sudo apt-get install -y shellcheck
# Ignore echo vs printf warning for cross-shell compatibility
export SHELLCHECK_OPTS="-e SC2028"
./ci/runLint.sh
test_vagrant:
name: Test ${{ matrix.vagrant_dir }} with Vagrant
runs-on: macos-10.15
strategy:
fail-fast: false
matrix:
vagrant_dir:
- testboxes/freebsd32
- testboxes/freebsd64
- testboxes/debian32
- testboxes/debian64
- testboxes/linux-arm64
- testboxes/opensuse64
- testboxes/devuan64
- testboxes/netbsd64
- testboxes/openbsd64
steps:
- name: Check out code
uses: actions/checkout@v1
# disabled for now; GH actions no longer supports Vagrant. Will likely need
# to move to qemu or similar.
#
# test_vagrant:
# name: Test ${{ matrix.vagrant_dir }} with Vagrant
# runs-on: macos-12
# strategy:
# fail-fast: false
# matrix:
# vagrant_dir:
# - testboxes/freebsd32
# - testboxes/freebsd64
# - testboxes/debian32
# - testboxes/debian64
# - testboxes/linux-arm64
# - testboxes/opensuse64
# - testboxes/devuan64
# - testboxes/netbsd64
# - testboxes/openbsd64
# steps:
# - name: Check out code
# uses: actions/checkout@v1

- name: Test
run: ./ci/runVagrantTest.sh ${{ matrix.vagrant_dir }}
# - name: Test
# run: ./ci/runVagrantTest.sh ${{ matrix.vagrant_dir }}

test_docker:
name: Test ${{ matrix.docker_image }} with ${{ matrix.update_alternatives }} update-alternatives
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -99,7 +104,7 @@ jobs:

test_shells:
name: Test ${{ matrix.shell }} shell with ${{ matrix.update_alternatives }} update-alternatives
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -111,9 +116,6 @@ jobs:
- yash
- 'busybox sh'
- gash
- mrsh
#- 'toybox toysh'
#- oil
update_alternatives:
- y
- n
Expand All @@ -126,7 +128,7 @@ jobs:

test_alpine:
name: Test busybox on alpine with ${{ matrix.update_alternatives }} update-alternatives
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ fi
if [ "${platform:-x}" = "win64" ] || [ "${platform:-x}" = "win32" ]; then
extension='zip'
else
extension='tar.gz'
extension='tgz'
fi

if [ "${platform:-x}" = "linux64" ]; then
Expand All @@ -210,7 +210,7 @@ eval "$http 'https://github.com/zyedidia/micro/releases/download/v$TAG/micro-$TA

case "$extension" in
"zip") unzip -j "micro.$extension" -d "micro-$TAG" ;;
"tar.gz") tar -xvzf "micro.$extension" "micro-$TAG/micro" ;;
"tgz") tar -xvzf "micro.$extension" "micro-$TAG/micro" ;;
esac

mv "micro-$TAG/micro" ./micro
Expand Down

0 comments on commit 2bea87c

Please sign in to comment.