summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Mortier <mort@cantab.net>2018-12-17 21:33:39 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-12-20 22:44:02 +0100
commit66bfa7d95a7a74d0ec03cffb19f50a71f77c8bf2 (patch)
treec977756b5462f8700026c689b1b039cffb67a0ef
parent88b1d40d8ae1413fd70b9255687d01e42984c032 (diff)
downloadalpine-mksite-66bfa7d95a7a74d0ec03cffb19f50a71f77c8bf2.tar.bz2
alpine-mksite-66bfa7d95a7a74d0ec03cffb19f50a71f77c8bf2.tar.xz
make: simplify and split `run-test` and `stop-test`
Signed-off-by: Richard Mortier <mort@cantab.net>
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e1f31a9..128dcc3 100644
--- a/Makefile
+++ b/Makefile
@@ -76,8 +76,15 @@ $(out)/atom.xml: news.yaml
mv $@.tmp $@
DOCKER_IMAGE = alpine-mksite
+.PHONY: build
build:
docker build -t $(DOCKER_IMAGE) .
-test:
- docker ps -aq --filter="port=8000/tcp" | xargs docker rm -f
+
+.PHONY: run-test
+run-test:
docker run -t -p 8000:8000 $(DOCKER_IMAGE)
+
+.PHONY: stop-test
+stop-test:
+ docker ps | grep '8000->8000' | tr -s " " | cut -f 1 -d " " \
+ | xargs docker rm -f