From 67b9f307329f5f9fbb8a0ce9f1fc36f46c9f0df6 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Wed, 24 Jul 2019 16:57:03 -0400 Subject: [PATCH] Add logic to fail the build if there are uncommitted lessToSass changes. (#1397) --- .travis.yml | 3 ++- build.xml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0e01869c334..339f2fa6e03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ before_script: - composer install - npm install -g eslint@"<5.0.0" - npm install -g jshint@"2.9.6" + - npm install cache: directories: @@ -22,4 +23,4 @@ cache: - $HOME/.composer/cache/files script: - - vendor/bin/phing eslint jshint phpunitfast phpcs-console php-cs-fixer-dryrun + - vendor/bin/phing eslint jshint phpunitfast phpcs-console php-cs-fixer-dryrun checkLessToSass diff --git a/build.xml b/build.xml index 9c951f0b69d..4eda8c40594 100644 --- a/build.xml +++ b/build.xml @@ -131,6 +131,12 @@ <exec command="jshint --config=${srcdir}/tests/jshint.json --exclude=themes/*/js/vendor --reporter=checkstyle ${srcdir}/themes > ${builddir}/reports/jshint-checkstyle.xml" /> </target> + <!-- Run LessToSass, error if there are uncommitted changes (used by Travis) --> + <target name="checkLessToSass"> + <exec command="grunt lessToSass" checkreturn="true" passthru="true" /> + <exec command="git diff --exit-code *.scss" checkreturn="true" passthru="true" /> + </target> + <!-- PHP API Documentation --> <target name="phpdoc"> <!-- GET phpDocumentor.phar --> -- GitLab