-
Notifications
You must be signed in to change notification settings - Fork 8
/
Justfile
56 lines (43 loc) · 1.83 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[macos]
prepare-nvim channel:
#!/usr/bin/env bash
set -eo pipefail
NVIM_DIR=".build/nvim/{{ channel }}"
test -d $NVIM_DIR || {
mkdir -p $NVIM_DIR
# Older versions of nvim don't have arch specific releases - so we do a simple retry without the arch component.
curl -L https://github.com/neovim/neovim/releases/download/{{ channel }}/nvim-macos-$(arch).tar.gz --fail > ./.build/nvim-macos.tar.gz || \
curl -L https://github.com/neovim/neovim/releases/download/{{ channel }}/nvim-macos.tar.gz --fail > ./.build/nvim-macos.tar.gz
xattr -c ./.build/nvim-macos.tar.gz
tar xzf ./.build/nvim-macos.tar.gz -C $NVIM_DIR --strip-components=1
rm ./.build/nvim-macos.tar.gz
}
[linux]
prepare-nvim channel:
#!/usr/bin/env bash
set -eo pipefail
NVIM_DIR=".build/nvim/{{ channel }}"
test -d $NVIM_DIR || {
mkdir -p $NVIM_DIR
curl -L https://github.com/neovim/neovim/releases/download/{{ channel }}/nvim-linux64.tar.gz > ./.build/nvim-linux64.tar.gz
tar xzf ./.build/nvim-linux64.tar.gz -C $NVIM_DIR --strip-components=1
rm ./.build/nvim-linux64.tar.gz
}
prepare-dependencies:
#!/usr/bin/env bash
test -d .build/dependencies || {
mkdir -p ./.build/dependencies
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ./.build/dependencies/plenary.nvim
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter ./.build/dependencies/nvim-treesitter
}
prepare channel: (prepare-nvim channel) prepare-dependencies
test channel="stable" file="": (prepare channel)
#!/usr/bin/env bash
set -eo pipefail
NVIM_DIR=".build/nvim/{{ channel }}"
./$NVIM_DIR/bin/nvim --version
./$NVIM_DIR/bin/nvim \
--headless \
--noplugin \
-u tests/config.lua \
-c "PlenaryBustedDirectory tests/nvim-paredit/{{ file }} { minimal_init='tests/config.lua', sequential=true }"