From eef9bfa2f78135d0716b64b59b3d363c1ca16d6d Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Mon, 4 Sep 2017 11:48:45 -0500 Subject: [PATCH] Add a `testhost` target This target runs Bash in an ephemeral docker container with the HEAD revision of yadm mounted at /bin/yadm. You can override the version using any "commit-ish". Eg. `target=1.06 make testhost` --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index c346475..1cf77bf 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,15 @@ shellcheck: [ "$$test_result" -ne 0 ] && exit 1; \ done; true +.PHONY: testhost +testhost: + @target=HEAD + @rm -rf /tmp/testhost + @git show $(target):yadm > /tmp/testhost + @chmod a+x /tmp/testhost + @echo Starting testhost target=\"$$target\" + @docker run -w /root --hostname testhost --rm -it -v "/tmp/testhost:/bin/yadm:ro" yadm/testbed:latest bash + man: groff -man -Tascii ./yadm.1 | less