mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Write .bash version of .bats to /tmp
This commit is contained in:
parent
c4f2141e35
commit
06757b3544
9
Makefile
9
Makefile
@ -26,11 +26,12 @@ shellcheck:
|
||||
@echo Running shellcheck
|
||||
@shellcheck --version || true
|
||||
@shellcheck -s bash yadm test/*.bash
|
||||
@for bats_file in test/*bats; do \
|
||||
sed 's/^@test.*{/function test() {/' "$$bats_file" > "$$bats_file .bash"; \
|
||||
shellcheck -s bash "$$bats_file .bash"; \
|
||||
@cd test; \
|
||||
for bats_file in *bats; do \
|
||||
sed 's/^@test.*{/function test() {/' "$$bats_file" > "/tmp/$$bats_file.bash"; \
|
||||
shellcheck -s bash "/tmp/$$bats_file.bash"; \
|
||||
test_result="$$?"; \
|
||||
rm -f "$$bats_file .bash"; \
|
||||
rm -f "/tmp/$$bats_file.bash"; \
|
||||
[ "$$test_result" -ne 0 ] && exit 1; \
|
||||
done; true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user