Skip to content

Commit 4b806f0

Browse files
authored
ci: Test webinstall (#153)
* ci: Test webinstall * Try run script directly * chmod * fix ci * run cmd * support arm linux * Add webinstall badge
1 parent ac0b895 commit 4b806f0

File tree

4 files changed

+34
-20
lines changed

4 files changed

+34
-20
lines changed

.github/workflows/webinstall.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,25 @@ jobs:
2626
os: [ubuntu-latest, macos-latest, windows-latest]
2727

2828
steps:
29+
- uses: actions/checkout@v3
30+
2931
- name: Install Eask (Unix)
3032
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
31-
run: curl -fsSL https://raw.githubusercontent.com/emacs-eask/cli/master/webinstall/install.sh | sh
33+
run: |
34+
chmod -R 777 ./
35+
./webinstall/install.sh
3236
3337
- name: Install Eask (Windows)
3438
if: matrix.os == 'windows-latest'
35-
run: curl.exe -fsSL https://raw.githubusercontent.com/emacs-eask/cli/master/webinstall/install.bat | cmd /Q
39+
run: ./webinstall/install.bat
3640

37-
- name: Testing...
41+
- name: Testing... (Unix)
42+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
3843
run: |
3944
~/.local/bin/eask --version
45+
46+
- name: Testing... (Windows)
47+
if: matrix.os == 'windows-latest'
48+
shell: cmd
49+
run: |
50+
%USERPROFILE%/.local/bin/eask.exe --version

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,9 @@ influencing your personal configuration. Eask aims to be:
6767
| Test `ert` command || [![Test ert](https://github.com/emacs-eask/cli/actions/workflows/test_ert.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/test_ert.yml) |
6868
| Test `ert-runner` command || [![Test ert-runner](https://github.com/emacs-eask/cli/actions/workflows/test_ert-runner.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/test_ert-runner.yml) |
6969
| Test `buttercup` command || [![Test buttercup](https://github.com/emacs-eask/cli/actions/workflows/test_buttercup.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/test_buttercup.yml) |
70+
71+
###### Others
72+
73+
| Description | Done | Status |
74+
|-------------|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
75+
| Webinstall || [![Webinstall](https://github.com/emacs-eask/cli/actions/workflows/webinstall.yml/badge.svg)](https://github.com/emacs-eask/cli/actions/workflows/webinstall.yml) |

docs/content/en/Getting Started/Install Eask.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,22 @@ This document guides you through the installation of Eask.
1313

1414
Download the appropriate version for your platform from [Eask Releases](https://github.com/emacs-eask/cli/releases).
1515
Once downloaded, the binary can be run from anywhere. You don’t need to install
16-
it into a global location. This works well for shared hosts and other systems
16+
it in a global location. This works well for shared hosts and other systems
1717
where you don’t have a privileged account.
1818

1919
Ideally, you should install it somewhere in your `PATH` for easy use. `/usr/local/bin`
2020
is the most probable location.
2121

22-
### Using Shell
22+
### Using Shell (macOS and Linux)
2323

24-
Eask's [webinstall](https://github.com/emacs-eask/cli/tree/master/webinstall)
25-
provides convenience scripts to download and install the binary.
26-
27-
#### macOS and Linux
28-
29-
```
30-
curl -fsSL https://raw.githubusercontent.com/emacs-eask/cli/master/webinstall/install.sh | sh
24+
```sh
25+
$ curl -fsSL https://raw.githubusercontent.com/emacs-eask/cli/master/webinstall/install.sh | sh
3126
```
3227

33-
#### Windows
28+
### Using Shell (Windows)
3429

35-
```
36-
curl.exe -fsSL https://raw.githubusercontent.com/emacs-eask/cli/master/webinstall/install.bat | cmd /Q
30+
```sh
31+
$ curl.exe -fsSL https://raw.githubusercontent.com/emacs-eask/cli/master/webinstall/install.bat | cmd /Q
3732
```
3833

3934
### npm

webinstall/install.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@
2424

2525
set -e
2626

27+
if ! command -v unzip >/dev/null; then
28+
echo "Error: unzip is required to install Eask." 1>&2
29+
exit 1
30+
fi
31+
2732
if [ "$OS" = "Windows_NT" ]; then
2833
target="win-x64"
2934
else
3035
case $(uname -sm) in
3136
"Darwin x86_64") target="macos-x64" ;;
3237
"Darwin arm64") target="macos-arm64" ;;
33-
"Linux aarch64")
34-
echo "Error: Official Deno builds for Linux aarch64 are not available. (see: https://github.com/denoland/deno/issues/1846 )" 1>&2
35-
exit 1
36-
;;
38+
"Linux aarch64") target="linux-arm64" ;;
3739
*) target="linux-x64" ;;
3840
esac
3941
fi
@@ -47,7 +49,7 @@ mkdir -p $eask_bin_dir
4749

4850
curl -fsSL $eask_uri -o $zip
4951

50-
tar -xf $zip -C $eask_bin_dir
52+
unzip -d "$eask_bin_dir" -o "$zip"
5153

5254
rm $zip
5355

0 commit comments

Comments
 (0)