Skip to content

Commit c151525

Browse files
authored
feat(webinstall): Add webinstall (#151)
* feat(webinstall): Add webinstall * Add webinstaller * Add webinstall test
1 parent 421e937 commit c151525

File tree

9 files changed

+141
-6
lines changed

9 files changed

+141
-6
lines changed

.github/workflows/checker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ jobs:
5454
- name: Testing...
5555
run: |
5656
make command-check-eask
57-

.github/workflows/link.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ jobs:
5454
- name: Testing...
5555
run: |
5656
make command-link
57-

.github/workflows/search.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ jobs:
5151
- name: Testing...
5252
run: |
5353
make command-search
54-

.github/workflows/test_buttercup.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ jobs:
5151
- name: Testing...
5252
run: |
5353
make test-buttercup
54-

.github/workflows/test_ert-runner.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ jobs:
5151
- name: Testing...
5252
run: |
5353
make test-ert-runner
54-

.github/workflows/test_ert.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ jobs:
5151
- name: Testing...
5252
run: |
5353
make test-ert
54-

.github/workflows/webinstall.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Webinstall
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- webinstall/**
9+
pull_request:
10+
branches:
11+
- master
12+
paths:
13+
- webinstall/**
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
test:
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [ubuntu-latest, macos-latest, windows-latest]
27+
28+
steps:
29+
- name: Install Eask (Unix)
30+
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
32+
33+
- name: Install Eask (Windows)
34+
if: matrix.os == 'windows-latest'
35+
run: curl.exe -fsSL https://raw.githubusercontent.com/emacs-eask/cli/master/webinstall/install.bat | cmd /Q
36+
37+
- name: Testing...
38+
run: |
39+
~/.local/bin/eask --version

webinstall/install.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@echo off
2+
3+
:: Copyright 2023 the Eask authors.
4+
5+
:: This program is free software; you can redistribute it and/or modify
6+
:: it under the terms of the GNU General Public License as published by
7+
:: the Free Software Foundation; either version 3, or (at your option)
8+
:: any later version.
9+
10+
:: This program is distributed in the hope that it will be useful,
11+
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
:: GNU General Public License for more details.
14+
15+
:: You should have received a copy of the GNU General Public License
16+
:: along with GNU Emacs; see the file COPYING. If not, write to the
17+
:: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18+
:: Boston, MA 02110-1301, USA.
19+
20+
::: Commentary:
21+
::
22+
:: TODO(everyone): Keep this script simple and easily auditable.
23+
::
24+
25+
set URL=https://github.com/emacs-eask/binaries/raw/master/win-x64.zip
26+
set EAKS_BIN_DIR=%USERPROFILE%\.local\bin
27+
set ZIP=%EASK_BIN_DIR%\eask.zip
28+
29+
mkdir %EAKS_BIN_DIR%
30+
31+
curl.exe -fsSL %URL% -o %ZIP%
32+
33+
tar.exe -xf %ZIP% -C %EAKS_BIN_DIR%
34+
35+
del %ZIP%
36+
37+
echo ✓ Eask is installed in %EAKS_BIN_DIR%.
38+
echo.
39+
echo Don't forget to add `%EASK_BIN_DIR% to PATH environment variable:
40+
echo.
41+
echo set PATH=%ELDEV_BIN_DIR%;%%PATH%%

webinstall/install.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/sh
2+
3+
# Copyright 2023 the Eask authors.
4+
5+
# This program is free software; you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation; either version 3, or (at your option)
8+
# any later version.
9+
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
15+
# You should have received a copy of the GNU General Public License
16+
# along with GNU Emacs; see the file COPYING. If not, write to the
17+
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18+
# Boston, MA 02110-1301, USA.
19+
20+
## Commentary:
21+
#
22+
# TODO(everyone): Keep this script simple and easily auditable.
23+
#
24+
25+
set -e
26+
27+
$URL=https://github.com/emacs-eask/binaries/raw/master/linux-x64.zip
28+
29+
if [ "$OS" = "Windows_NT" ]; then
30+
target="win-x64"
31+
else
32+
case $(uname -sm) in
33+
"Darwin x86_64") target="macos-x64" ;;
34+
"Darwin arm64") target="macos-arm64" ;;
35+
"Linux aarch64")
36+
echo "Error: Official Deno builds for Linux aarch64 are not available. (see: https://github.com/denoland/deno/issues/1846 )" 1>&2
37+
exit 1
38+
;;
39+
*) target="linux-x64" ;;
40+
esac
41+
fi
42+
43+
eask_uri="https://github.com/emacs-eask/binaries/raw/master/${target}.zip"
44+
45+
eask_bin_dir=~/.local/bin
46+
zip=$eask_bin_dir/eask.zip
47+
48+
mkdir -p $eask_bin_dir
49+
50+
curl -fsSL eask_uri -o $zip
51+
52+
tar -xf $zip -C $eask_bin_dir
53+
54+
rm $zip
55+
56+
echo "✓ Eask is installed in %EAKS_BIN_DIR%."
57+
echo
58+
echo "Don't forget to add ${eask_bin_dir} to PATH environment variable:"
59+
echo
60+
echo " export PATH=\"${eask_bin_dir}:\$PATH\""
61+

0 commit comments

Comments
 (0)