grunt-build-control
Advanced tools
Comparing version 0.6.0 to 0.6.1
{ | ||
"name": "grunt-build-control", | ||
"description": "Automate version control tasks for your project's built code. Keep built code in sync with source code, maintain multiple branches of built code, commit with automatic messages, and push to remote repositories.", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"homepage": "https://github.com/robwierzbowski/grunt-build-control", | ||
@@ -6,0 +6,0 @@ "author": "Rob Wierzbowski <hello@robwierzbowski.com> (http://robwierzbowski)", |
# grunt-build-control [](https://travis-ci.org/robwierzbowski/grunt-build-control) | ||
[](https://gitter.im/robwierzbowski/grunt-build-control?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
> Version control built code and deploy it. | ||
> Version control built code. | ||
### HELP WRITE TESTS FOR THIS TASK | ||
For continued development, this library needs test coverage. If you like writing tests and like this Grunt task, please take a look at [issue #19](https://github.com/robwierzbowski/grunt-build-control/issues/19) and consider helping with a pull request. Any assistance is appreciated. | ||
## Getting started | ||
This plugin requires [Grunt](http://gruntjs.com/) `~0.4.0` and [Git](http://git-scm.com/) `> 1.8`. | ||
This plugin requires [Grunt](http://gruntjs.com/) `~0.4.0` and [Git](http://git-scm.com/) `>= 1.8`. | ||
grunt-build-control also supports [AWS Electric Beanstalk](https://aws.amazon.com/elasticbeanstalk/) `>= v3.5.2` | ||
@@ -15,0 +10,0 @@ If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide which explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with Grunt you can install the plugin with the command: |
@@ -148,7 +148,7 @@ /* | ||
function assignTokens () { | ||
var sourceBranch = shelljs.exec('git symbolic-ref --quiet HEAD', {silent: true}); | ||
var sourceBranch = shelljs.exec('git rev-parse --abbrev-ref HEAD', {silent: true}); | ||
var sourceCommit = shelljs.exec('git rev-parse --short HEAD', {silent: true}); | ||
if (sourceBranch.code === 0) { | ||
tokens.branch = sourceBranch.output.split('/').pop().replace(/\n/g, ''); | ||
tokens.branch = sourceBranch.output.replace(/\n/g, ''); | ||
} | ||
@@ -155,0 +155,0 @@ if (sourceCommit.code === 0) { |
@@ -185,3 +185,49 @@ /*jshint -W030, mocha:true */ | ||
describe('feature branch deployment', function() { | ||
it('should contain the correct sourceBranch name', function(done) { | ||
var tasks = []; | ||
/** | ||
* Test case specific setup | ||
*/ | ||
tasks.push(function git_init(next) { | ||
childProcess.exec('git init', next); | ||
}); | ||
tasks.push(function git_init(next) { | ||
childProcess.exec('git checkout -b feature/numbers', next); | ||
}); | ||
tasks.push(function git_add(next) { | ||
childProcess.exec('git add .', next); | ||
}); | ||
tasks.push(function git_commit(next) { | ||
childProcess.exec('git commit -m "feature branch deployment"', next); | ||
}); | ||
/** | ||
* Execute scenario | ||
*/ | ||
tasks.push(function execute_scenario(next) { | ||
execScenario(function(err) { | ||
expect(err).to.not.exist; | ||
next(); | ||
}); | ||
}); | ||
tasks.push(function verify_commit_message(next) { | ||
childProcess.exec('git log -1 --pretty=%B', {cwd: 'validate'}, function(err, stdout) { | ||
var commitMsg = stdout.replace(/\n/g, ''); | ||
expect(commitMsg).to.equal('feature/numbers'); | ||
next(); | ||
}); | ||
}); | ||
async.series(tasks, done); | ||
}); | ||
}); | ||
describe('merge multiple repos', function() { | ||
@@ -188,0 +234,0 @@ it('merge multiple repos', function(done) { |
Sorry, the diff of this file is not supported yet
149075
136
1361
292