Browse Source

Shorten the installation script (#245)

remotes/origin/add-with-shims
Gal Schlezinger 4 years ago committed by GitHub
parent
commit
6db8de9612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 38
      .github/workflows/installation_script.yml
  2. 28
      README.md
  3. 3
      site/vercel.json

38
.github/workflows/installation_script.yml

@ -37,41 +37,3 @@ jobs: @@ -37,41 +37,3 @@ jobs:
name: Run the installation script
- run: ./.ci/test_installation_script.sh ${{ matrix.shell }}
name: 'Test installation script'
# install_on_mac_binary:
# runs-on: macos-latest
# strategy:
# matrix:
# include:
# - shell: fish
# source: ~/.config/fish/config.fish
# - shell: zsh
# source: ~/.zshrc
# - shell: bash
# source: ~/.bashrc
# steps:
# - uses: actions/checkout@v2
# - run: "brew install ${{ matrix.shell }}"
# name: Install shell
# - name: reset bashrc file
# run: |
# cp ~/.bashrc ~/.bashrc.bak
# echo '. ~/.bashrc.bak' > ~/.bashrc
# - run: "env SHELL=$(which ${{ matrix.shell }}) bash ./.ci/install.sh --force-install"
# name: Run the installation script
# - name: 'Install a Node version with `fnm install`'
# run: |
# ${{ matrix.shell }} -c '
# source ${{ matrix.source }}
# fnm install 12.5.0
# fnm ls | grep 12.5.0
# '
# - name: 'Check switching versions with `fnm use`'
# run: |
# ${{ matrix.shell }} -c '
# source ${{ matrix.source }}
# fnm use 12.5.0
# node --version | grep 12.5.0
# '

28
README.md

@ -20,25 +20,19 @@ @@ -20,25 +20,19 @@
## Installation
### Using Homebrew (OSX)
```bash
brew install Schniz/tap/fnm
```
[This is a custom tap I'm maintaining](https://github.com/Schniz/homebrew-tap), and will be used until fnm will move to the official one.
### Using a script
For `bash`, `zsh` and `fish` shells, there's an [automatic installation script](./.ci/install.sh):
```bash
curl -fsSL https://github.com/Schniz/fnm/raw/master/.ci/install.sh | bash
curl -fsSL https://fnm.vercel.app/install | bash
```
### Upgrade
Upgrading `fnm` is almost the same as installing it. To prevent duplication in your shell config file add `--skip-shell` to install command.
On OSX, it is a simple as `brew upgrade Schniz/tap/fnm`.
On other operating systems, upgrading `fnm` is almost the same as installing it. To prevent duplication in your shell config file add `--skip-shell` to install command.
#### Parameters
@ -57,11 +51,23 @@ MacOS installations using the installation script are deprecated in favor of the @@ -57,11 +51,23 @@ MacOS installations using the installation script are deprecated in favor of the
Example:
```bash
curl -fsSL https://github.com/Schniz/fnm/raw/master/.ci/install.sh | bash -s -- --install-dir "./.fnm" --skip-shell
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "./.fnm" --skip-shell
```
### Manually
#### Using Homebrew (OSX)
[This is a custom tap I'm maintaining](https://github.com/Schniz/homebrew-tap), and will be used until fnm will move to the official one.
```bash
brew install Schniz/tap/fnm
```
Then apply the changes the installer prints, to set up your shell profile.
#### Using a release binary
- Download the [latest release binary](https://github.com/Schniz/fnm/releases) for your system
- Make it available globally on `$PATH`
- Add the following line to your `.bashrc`/`.zshrc` file:

3
site/vercel.json

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
{
"redirects": [
{ "source": "/", "destination": "https://github.com/Schniz/fnm" }
{ "source": "/", "destination": "https://github.com/Schniz/fnm" },
{ "source": "/install", "destination": "https://github.com/Schniz/fnm/raw/master/.ci/install.sh" }
]
}

Loading…
Cancel
Save