-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (34 loc) · 839 Bytes
/
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
HFSTTAG = hfst-$$(cd hfst ; git describe --tags)
## build docker image
dbuild:
docker build -t $${USER}/hfst:latest -t $${USER}/hfst:$(HFSTTAG) .
.PHONY: dbuild
## enter into the container
dshell:
@docker run --rm -it $${USER}/hfst:latest sh
.PHONY: dshell
## show images and containers
dls:
@echo 'IMAGES:'
@docker image ls
@echo
@echo 'CONTAINERS:'
@docker container ls
.PHONY: dls
## delete unnecessary containers and images
dclean:
@docker container prune -f
@docker image prune -f
.PHONY: dclean
## push to github repo, trigger autobuild on dockerhub
release:
@if [ "$$(git status --porcelain)" ] ; then \
echo 'ERROR: working tree are not clean! Exit.' ; \
exit 1; \
fi
git checkout -b $(HFSTTAG)
git merge master
git push origin $(HFSTTAG)
git checkout master
git branch -D $(HFSTTAG)
.PHONY: release