mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 20:10:10 -04:00
ci: fix invalid workflow
Context variables aren't always available, so we can't rely on them for e.g. environment variables. Also merge all install scripts into `script/ci-install.sh`, that way it can be called the same way regardless of system.
This commit is contained in:
parent
143a342bd8
commit
6444286cbf
8 changed files with 31 additions and 28 deletions
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
curl -L https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-macos.tar.gz | tar -xz
|
||||
sudo ln -s "$PWD"/nvim-macos/bin/nvim /usr/local/bin
|
||||
rm -rf "$PWD"/nvim-macos/lib/nvim/parser
|
||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
ln -s "$PWD" ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-linux64.tar.gz
|
||||
tar -zxf nvim-linux64.tar.gz
|
||||
sudo ln -s "$PWD"/nvim-linux64/bin/nvim /usr/local/bin
|
||||
rm -rf "$PWD"/nvim-linux64/lib/nvim/parser
|
||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
ln -s "$PWD" ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
curl -L https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-win64.zip -o nvim-win64.zip
|
||||
unzip nvim-win64
|
||||
mkdir -p ~/AppData/Local/nvim/pack/nvim-treesitter/start
|
||||
mkdir -p ~/AppData/Local/nvim-data
|
||||
cp -r "$PWD" ~/AppData/Local/nvim/pack/nvim-treesitter/start
|
||||
25
scripts/ci-install.sh
Executable file
25
scripts/ci-install.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
os=$(uname -s)
|
||||
if [[ $os == Linux ]]; then
|
||||
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-linux64.tar.gz
|
||||
tar -zxf nvim-linux64.tar.gz
|
||||
sudo ln -s "$PWD"/nvim-linux64/bin/nvim /usr/local/bin
|
||||
rm -rf "$PWD"/nvim-linux64/lib/nvim/parser
|
||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
ln -s "$PWD" ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
elif [[ $os == Darwin ]]; then
|
||||
curl -L https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-macos.tar.gz | tar -xz
|
||||
sudo ln -s "$PWD"/nvim-macos/bin/nvim /usr/local/bin
|
||||
rm -rf "$PWD"/nvim-macos/lib/nvim/parser
|
||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
ln -s "$PWD" ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||
else
|
||||
curl -L https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-win64.zip -o nvim-win64.zip
|
||||
unzip nvim-win64
|
||||
mkdir -p ~/AppData/Local/nvim/pack/nvim-treesitter/start
|
||||
mkdir -p ~/AppData/Local/nvim-data
|
||||
cp -r "$PWD" ~/AppData/Local/nvim/pack/nvim-treesitter/start
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue