git-sig/Makefile

53 lines
1.0 KiB
Makefile
Raw Normal View History

.PHONY: all
all: lint test verify
2020-11-19 21:40:38 +00:00
.PHONY: test
2020-11-18 23:23:15 +00:00
test: test-image
docker run \
--rm \
--volume $(PWD)/:/home/test/sig \
2020-11-18 23:23:15 +00:00
local/sig-test \
bats sig/test/test.bats
2020-11-18 23:23:15 +00:00
2020-11-19 21:40:38 +00:00
.PHONY: lint
lint: test-image
docker run \
--rm \
--interactive \
--volume $(PWD)/:/home/test/sig \
local/sig-test \
shellcheck sig/sig
2020-11-20 09:11:09 +00:00
.PHONY: verify
verify: test-image
docker run \
--rm \
--interactive \
--volume $(PWD)/:/home/test/sig \
local/sig-test /bin/bash -c " \
2020-11-20 09:21:39 +00:00
cp -R sig /tmp/sig; \
cd /tmp/sig; \
./sig fetch \
--group maintainers \
6B61ECD76088748C70590D55E90A401336C8AAA9; \
./sig verify --threshold 1 --method=git --group maintainers; \
./sig verify --threshold 3 --method=detached --group maintainers; \
2020-11-20 09:11:09 +00:00
"
2020-11-18 23:23:15 +00:00
.PHONY: test-image
test-image:
docker build \
--tag local/sig-test \
--file $(PWD)/test/Dockerfile \
$(PWD)
2020-11-19 21:40:38 +00:00
.PHONY: test-shell
test-shell: test-image
2020-11-18 23:23:15 +00:00
docker run \
--rm \
2020-11-20 03:51:41 +00:00
--tty \
2020-11-18 23:23:15 +00:00
--interactive \
--volume $(PWD)/:/home/test/sig \
2020-11-18 23:23:15 +00:00
local/sig-test \
bash --init-file /home/test/sig/test/test_shell.bash