I want to test if file contain a pattern (skipped jasmine tests that should make my build fail, when run from travis).
I have code like this:
skipped_tests:
$(if $(shell grep -E 'iit|ddescribe' spec/terminalSpec.js), @false, @true)
the problem is that I don't get output from grep, when it find the lines that match the pattern. I want this so I can see what line caused the issue in travis build log. Is there a way to reverse a command error code (return 0 when non 0 is returned and vice versa)?
I've also tried this:
skipped_tests:
grep -E 'iit|ddescribe' spec/terminalSpec.js
@test $$? -eq 0 # should it be -ne
but this echos one line that have iit and doesn't fail, and if it doesn't find the line, then it fails on grep.