-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 840 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (26 loc) · 840 Bytes
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
IMAGE_NAME=$(shell basename $(PWD))
TAG=$(shell cat VERSION)
NAMESPACE=$(USER)
.PHONY: build run release install clean test
default: build
build:
@echo INFO Build image $(NAMESPACE)/$(IMAGE_NAME):$(TAG)
@docker build -t $(NAMESPACE)/$(IMAGE_NAME):$(TAG) .
run:
@echo INFO Run docker image
@docker run -it --rm $(NAMESPACE)/$(IMAGE_NAME):$(TAG)
release:
@echo INFO Release source archive
@mkdir -p ./dist
@tar --exclude="./dist" --exclude="./.git" -cvf dist/$(IMAGE_NAME).tar.gz .
@echo INFO dist/$(IMAGE_NAME).tar.gz created.
clean:
@echo INFO Clean archive
@rm -r ./dist
install:
@echo INFO Install $(IMAGE_NAME)
@mkdir -p $(HOME)/.vim/packs/plugins/start/
@cp -R $(PWD) $(HOME)/.vim/packs/plugins/start/
test:
@echo INFO Test $(IMAGE_NAME)
vim -c "redir > vim.output | silent call testing#test() | redir END | q!"