Skip to content

Commit

Permalink
Merge branch 'master' into releases
Browse files Browse the repository at this point in the history
  • Loading branch information
maraoz committed Dec 24, 2014
2 parents 1131cdd + 386a6de commit 2b75687
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
28 changes: 19 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,33 +228,45 @@ gulp.task('release:bump', function() {
});

gulp.task('release:checkout-releases', function(cb) {
git.checkout('releases', {args: ''}, cb);
git.checkout('releases', {
args: ''
}, cb);
});

gulp.task('release:merge-master', function(cb) {
git.merge('master', {args: ''}, cb);
git.merge('master', {
args: ''
}, cb);
});

gulp.task('release:checkout-master', function(cb) {
git.checkout('master', {args: ''}, cb);
git.checkout('master', {
args: ''
}, cb);
});

gulp.task('release:add-built-files', function() {
return gulp.src(['./browser/bitcore.js', './browser/bitcore.min.js', './package.json', './bower.json'])
.pipe(git.add({args: '-f'}));
.pipe(git.add({
args: '-f'
}));
});

gulp.task('release:build-commit', ['release:add-built-files'], function() {
var pjson = require('./package.json');
return gulp.src(['./browser/bitcore.js', './browser/bitcore.min.js', './package.json', './bower.json'])
.pipe(git.commit('Build: ' + pjson.version, {args: ''}));
.pipe(git.commit('Build: ' + pjson.version, {
args: ''
}));
});

gulp.task('release:version-commit', function() {
var pjson = require('./package.json');
var files = ['./package.json', './bower.json'];
return gulp.src(files)
.pipe(git.commit('Bump package version to ' + pjson.version, {args: ''}));
.pipe(git.commit('Bump package version to ' + pjson.version, {
args: ''
}));
});

gulp.task('release:push-releases', function(cb) {
Expand All @@ -273,9 +285,7 @@ gulp.task('release:push-tag', function(cb) {
var pjson = require('./package.json');
var name = 'v' + pjson.version;
git.tag(name, 'Release ' + name, function() {
git.push('bitpay', name, {
args: '--tags'
}, cb);
git.push('bitpay', name, cb);
});
});

Expand Down
4 changes: 1 addition & 3 deletions lib/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ function Address(data, network, type) {
return data;
}

if (!data) {
throw new TypeError('First argument is required, please include address data.');
}
$.checkArgument(data, new TypeError('First argument is required, please include address data.'));

if (network && !Networks.get(network)) {
throw new TypeError('Second argument must be "livenet" or "testnet".');
Expand Down

0 comments on commit 2b75687

Please sign in to comment.