grunt-checkbranch
Advanced tools
Comparing version 0.3.4 to 0.3.6
{ | ||
"name": "grunt-checkbranch", | ||
"description": "Check that we are on a correct Git branch before proceeding.", | ||
"version": "0.3.4", | ||
"homepage": "https://github.com/dymonaz/grunt-checkbranch", | ||
"description": "Checks that we are on a correct git branch before proceeding.", | ||
"version": "0.3.6", | ||
"homepage": "https://github.com/dominykas/grunt-checkbranch", | ||
"author": { | ||
"name": "Dominykas Blyžė", | ||
"email": "hello@dominykas.com", | ||
"url": "http://www.dominykas.com/" | ||
"url": "https://www.dominykas.com/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/dymonaz/grunt-checkbranch.git" | ||
"url": "git://github.com/dominykas/grunt-checkbranch.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/dymonaz/grunt-checkbranch/issues" | ||
"url": "https://github.com/dominykas/grunt-checkbranch/issues" | ||
}, | ||
"licenses": [ | ||
"contributors": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/dymonaz/grunt-checkbranch/blob/master/LICENSE-MIT" | ||
"name": "Daniel Lowes", | ||
"url": "https://github.com/Pleochism" | ||
} | ||
], | ||
"license": "MIT", | ||
"main": "Gruntfile.js", | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"node": ">= 0.10.0" | ||
}, | ||
@@ -32,13 +33,13 @@ "scripts": { | ||
"devDependencies": { | ||
"buster": "~0.7.6", | ||
"grunt": "~0.4.1", | ||
"grunt-bump": "^0.3.0", | ||
"grunt-buster": "~0.3.1", | ||
"grunt-checkpending": "^0.1.7", | ||
"grunt-cli": "^0.1.13", | ||
"grunt-contrib-clean": "~0.6.0", | ||
"grunt-contrib-jshint": "~0.11.0" | ||
"buster": "0.7.x", | ||
"grunt": "0.4.x", | ||
"grunt-bump": "0.3.x", | ||
"grunt-buster": "0.3.x", | ||
"grunt-checkpending": "0.1.x", | ||
"grunt-cli": "0.1.x", | ||
"grunt-contrib-clean": "0.6.x", | ||
"grunt-contrib-jshint": "0.11.x" | ||
}, | ||
"peerDependencies": { | ||
"grunt": "~0.4.1" | ||
"grunt": "0.4.x" | ||
}, | ||
@@ -50,4 +51,4 @@ "keywords": [ | ||
"dependencies": { | ||
"shelljs": "~0.4.0" | ||
"shelljs": "0.4.x" | ||
} | ||
} |
# grunt-checkbranch | ||
> Check that we are on a correct Git branch before proceeding. | ||
Checks that we are on a correct git branch before proceeding. | ||
[![Build Status](https://travis-ci.org/dominykas/grunt-checkbranch.svg?branch=master)](https://travis-ci.org/dymonaz/grunt-checkbranch) | ||
[![Build Status](https://travis-ci.org/dominykas/grunt-checkbranch.svg?branch=master)](https://travis-ci.org/dominykas/grunt-checkbranch) | ||
## Getting Started | ||
This plugin requires Grunt `~0.4.1` | ||
If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: | ||
```shell | ||
@@ -16,3 +11,3 @@ npm install grunt-checkbranch --save-dev | ||
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript: | ||
And in your Gruntfile: | ||
@@ -23,38 +18,30 @@ ```js | ||
## The "checkbranch" task | ||
## Usage | ||
### Overview | ||
Include the task as one of your multitasks, optionally passing the desired branch (default: `master`) after a colon, e.g.: | ||
```js | ||
grunt.registerTask("default", ["test", "checkbranch:develop", "deploy"] | ||
grunt.registerTask("deploy", ["test", "checkbranch:develop", "copy"] | ||
``` | ||
In the example above, the `deploy` task will only be executed, if your project is currently on the `develop` branch - otherwise the run will result in a fatal error. | ||
Pass a "negated" branch where further tasks are not allowed by prepending an exclamation mark: | ||
You may override this behavior by passing `--no-checkbranch` via command line. You can disable `--no-checkbranch` (i.e. force the check) by setting a second param for the task, e.g. `checkbranch:master:true`. | ||
```js | ||
grunt.registerTask("deploy", ["test", "checkbranch:!master", "copy"] | ||
``` | ||
You may also negate the test, i.e. exclude a specific branch by prepending an exclamation mark, e.g. `"checkbranch:!develop"`. | ||
To skip checks: | ||
```shell | ||
grunt --no-checkbranch | ||
``` | ||
## Release History | ||
To force checks (disables skipping), add the third param with `true`: | ||
### 0.3.3 (2015-03-31) | ||
* io.js and 0.12 support | ||
* local grunt-cli | ||
* fix for verbosity | ||
```js | ||
grunt.registerTask("deploy", ["test", "checkbranch:develop:true", "copy"] | ||
``` | ||
### 0.3.2 (2015-03-24) | ||
* bump deps | ||
## Contributors ## | ||
### 0.3.1 (2014-05-26) | ||
* npm update | ||
* Travis | ||
### 0.3.0 (2014-02-24) | ||
* Added support for negating a branch, i.e. "run everywhere except X" (thx @Pleochism) | ||
### 0.2.2 (2013-09-29) | ||
* Added tests | ||
* Second bool param to force the check. | ||
### 0.2.1 (2013-09-24) | ||
* Initial release (after a few removed, buggy ones) | ||
* [Dominykas Blyžė](https://www.dominykas.com/) | ||
* [Daniel Lowes](https://github.com/Pleochism) |
@@ -1,9 +0,1 @@ | ||
/* | ||
* grunt-checkbranch | ||
* https://github.com/dymonaz/grunt-checkbranch | ||
* | ||
* Copyright (c) 2013 Dominykas Blyžė | ||
* Licensed under the MIT license. | ||
*/ | ||
'use strict'; | ||
@@ -10,0 +2,0 @@ |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9212
11
179
46
1
Updatedshelljs@0.4.x