Hi folks,
I have been trying to terminate/exit Travis CI build manually using a script which (itself) does not throw any exception but instead print an error log when the syntax (ttl) is not valid. See below one validation exception as an example.
gezim@gezim-Latitude-E5550:~/workspace/SDA/sda.tech$ ttl rdf-data/sda.tech.ttl
{ [Error: Expected entity but got literal on line 24277.]
context:
{ token: { line: 24277, type: 'literal', value: '"en-US"', prefix: '' },
line: 24277,
previousToken:
{ line: 24277,
type: 'prefixed',
value: 'language',
prefix: 'dct' } } }
Validator finished with 0 warnings and 1 errors.
The TurtleValidator.sh script contains this :
#!/bin/bash
set -e
uit=$(ttl "$1")
if [[ $uit == *[Error:* ]]; then
>&2 echo "Fail"; exit 1;
fi
and it has been fired on Travis using :
before_install:
- npm install -g turtle-validator
script:
- bash TurtleValidator.sh rdf-data/sda.tech.ttl
Please, have a look on .travis.yml file for more details.
Any help would be greatly appreciated.
Best regards,