Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

dominykas/grunt-checkbranch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-checkbranch

Checks that we are on a correct git branch before proceeding.

Build Status

npm install grunt-checkbranch --save-dev

And in your Gruntfile:

grunt.loadNpmTasks('grunt-checkbranch');

Usage

Include the task as one of your multitasks, optionally passing the desired branch (default: master) after a colon, e.g.:

grunt.registerTask("deploy", ["test", "checkbranch:develop", "copy"]

Pass a "negated" branch where further tasks are not allowed by prepending an exclamation mark:

grunt.registerTask("deploy", ["test", "checkbranch:!master", "copy"]

To skip checks:

grunt --no-checkbranch

To force checks (disables skipping), add the third param with true:

grunt.registerTask("deploy", ["test", "checkbranch:develop:true", "copy"]

Contributors

About

A grunt task, which fails, if the repository is not on a correct branch

Resources

Stars

Watchers

Forks

Packages

No packages published