From 49f7a59f316e7af83b0fdbf8dff54fca3270a1f5 Mon Sep 17 00:00:00 2001 From: Vincent Lamanna Date: Thu, 14 Nov 2013 18:40:15 +0000 Subject: [PATCH] Do not submit to coverall if not from travis. --- Gruntfile.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index a404e38..a02d8bb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -131,7 +131,14 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-karma'); grunt.loadNpmTasks('grunt-karma-coveralls'); - grunt.registerTask('test', ['dist-css', 'jshint', 'karma', 'coveralls']); + var testSubtasks = ['dist-css', 'jshint', 'karma']; + // Only push to coveralls under Travis + if (process.env.TRAVIS) { + if ((process.env.TRAVIS_REPO_SLUG === 'vlamanna/BootstrapFormHelpers' && process.env.TRAVIS_PULL_REQUEST === 'false')) { + testSubtasks.push('coveralls'); + } + } + grunt.registerTask('test', testSubtasks); // JS distribution task. grunt.registerTask('dist-js', ['concat', 'uglify']);