grunt-release icon indicating copy to clipboard operation
grunt-release copied to clipboard

beforeBump tasks don't exit immediately

Open domtronn opened this issue 10 years ago • 2 comments

Hi, I was using grunt-release with a beforeBump task to run the tests of my project before a release, but when these tasks error, the deferred.reject doesn't get caught or exit correctly, so regardless of the grunt status, the release continues.

Here's an example of the gruntfile.js

grunt.initConfig({
    // Task configuration.
    release:  {
        options: {
            beforeBump: ['test']
        }
    }
});

So when I run

grunt release

It runs the tests, but if they fail, it just continues with the release.

Is there a reason why we don't just call grunt.fail.warn here? Because this will exit the task immediately...

domtronn avatar Aug 18 '15 10:08 domtronn

I too want to run my tests pre release/bump and exit on failure, any updates regarding this?

jalet avatar Sep 15 '15 08:09 jalet

Thanks for the report. Makes total sense not to continue any further. Will have a look at implementing this.

drublic avatar Oct 02 '15 06:10 drublic