-
Notifications
You must be signed in to change notification settings - Fork 204
/
Copy pathMakefile
48 lines (38 loc) · 1.47 KB
/
Makefile
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
NVIM_EXEC ?= nvim
all: test documentation
# Use `make test` to run tests for all modules
test:
for nvim_exec in $(NVIM_EXEC); do \
printf "\n======\n\n" ; \
$$nvim_exec --version | head -n 1 && echo '' ; \
$$nvim_exec --headless --noplugin -u ./scripts/minimal_init.lua \
-c "lua require('mini.test').setup()" \
-c "lua MiniTest.run()" ; \
done
# Use `make test_xxx` to run tests for module 'mini.xxx'
TEST_MODULES = $(basename $(notdir $(wildcard tests/test_*.lua)))
$(TEST_MODULES):
for nvim_exec in $(NVIM_EXEC); do \
printf "\n======\n\n" ; \
$$nvim_exec --version | head -n 1 && echo '' ; \
$$nvim_exec --headless --noplugin -u ./scripts/minimal_init.lua \
-c "lua require('mini.test').setup()" \
-c "lua MiniTest.run_file('tests/[email protected]')" ; \
done
documentation:
$(NVIM_EXEC) --headless --noplugin -u ./scripts/minimal_init.lua -c "lua require('mini.doc').generate()" -c "qa!"
lintcommit-ci:
export LINTCOMMIT_STRICT=true && chmod u+x scripts/lintcommit-ci.sh && scripts/lintcommit-ci.sh
dual_sync:
chmod u+x scripts/dual_sync.sh && scripts/dual_sync.sh
dual_log:
chmod u+x scripts/dual_log.sh && scripts/dual_log.sh
dual_push:
chmod u+x scripts/dual_push.sh && scripts/dual_push.sh
printf "\n\033[1mAdjusting `sync` branch\033[0m\n"
git branch --force sync
git push origin sync
printf "\n\033[1mRemoving local patches\033[0m\n"
rm -r dual/patches
dual_release:
chmod u+x scripts/dual_release.sh && scripts/dual_release.sh "$(TAG_NAME)" "$(TAG_MESSAGE)"