diff --git a/.travis.yml b/.travis.yml index b072a64..29a944b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ before_install: - curl -s http://extensions.libreoffice.org/extension-center/russian-spellcheck-dictionary.-based-on-works-of-aot-group | grep -oP "http://extensions.libreoffice.org/extension-center/russian-spellcheck-dictionary.-based-on-works-of-aot-group/pscre[^\"]+" | sort -r | head -1 | wget -q -i - -O dictionary.otx - unzip dictionary.otx script: - - sh .travis.sh + - sh files/.travis.sh notifications: email: false diff --git a/.travis.sh b/files/.travis.sh similarity index 68% rename from .travis.sh rename to files/.travis.sh index 2c3d6b3..f4b71be 100644 --- a/.travis.sh +++ b/files/.travis.sh @@ -1,17 +1,18 @@ #!/bin/bash -go build spell-checker.go - +DIR=`dirname $0` EXIT_CODE=0 +go build -o $DIR/spell-checker $DIR/spell-checker.go +exit git diff HEAD^ --name-only > changed_files while read FILE; do echo -n "Проверка файла $FILE на опечатки... "; - OUTPUT_RU=$(cat "$FILE" | hunspell -d ru_RU | ./spell-checker); + OUTPUT_RU=$(cat "$FILE" | hunspell -d ru_RU | $DIR/spell-checker); RU_EXIT_CODE=$? - OUTPUT_EN=$(cat "$FILE" | hunspell -d en_US | ./spell-checker); + OUTPUT_EN=$(cat "$FILE" | hunspell -d en_US | $DIR/spell-checker); EN_EXIT_CODE=$? if [ $RU_EXIT_CODE -ne 0 ] || [ $EN_EXIT_CODE -ne 0 ]; then diff --git a/spell-checker.go b/files/spell-checker.go similarity index 100% rename from spell-checker.go rename to files/spell-checker.go diff --git a/test b/test deleted file mode 100644 index e0bf827..0000000 --- a/test +++ /dev/null @@ -1 +0,0 @@ -test #34 \ No newline at end of file