File: Makefile

package info (click to toggle)
vim-link-vim 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 528 kB
  • sloc: python: 66; makefile: 42
file content (46 lines) | stat: -rw-r--r-- 1,289 bytes parent folder | download
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
.PHONY: git-hooks help build access lint lint-docker test test-vim test-vim-docker test-nvim test-nvim-docker
.DEFAULT_GOAL := help

CONTAINER := docker container run --rm link.vim
CONTAINER_TTY := docker container run -it --rm link.vim
LINT := vint .
TEST := 'Vader! **/*.vader'

help:
	@echo "Available targets:"
	@echo "  git-hooks          - Set up git hooks for the project"
	@echo "  build              - Build the Docker image"
	@echo "  access             - Access the Docker container"
	@echo "  lint               - Run linter"
	@echo "  lint-docker        - Run linter inside container"
	@echo "  test               - Run tests in Neovim"
	@echo "  test-vim           - Run tests in Vim"
	@echo "  test-vim-docker    - Run tests in Vim inside container"
	@echo "  test-nvim          - Run tests in Neovim"
	@echo "  test-nvim-docker   - Run tests in Neovim inside container"

git-hooks:
	git config core.hooksPath .git_hooks

build:
	docker image build -t link.vim .
access: build
	$(CONTAINER_TTY)

lint:
	$(LINT)
lint-docker: build
	$(CONTAINER) $(LINT)

test:
	./test/run_tests.py -e nvim

test-vim:
	./test/run_tests.py -e vim
test-vim-docker: build
	$(CONTAINER) vim -c $(TEST)

test-nvim:
	./test/run_tests.py -e nvim
test-nvim-docker: build
	$(CONTAINER) nvim -c $(TEST)