Skip to content

Commit

Permalink
[BUGFIX] add repo back to manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
brousalis committed Jul 17, 2016
1 parent c045ff0 commit 014b5cc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
15 changes: 15 additions & 0 deletions gulpfile.js/lib/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

var fs = require('fs');

function repo() {
var manifest = exports.file();
var repo = manifest.repository && /git@github\.com:([\w-]+)\/([\w-]+)\.git/.exec(manifest.repository.url);
if (!repo) repo = /git\:\/\/github\.com\/([\w-]+)\/([\w-]+)\.git/.exec(manifest.repository.url);
return repo;
}

exports.file = function() {
return JSON.parse(fs.readFileSync('./package.json', 'utf8'));
}
Expand All @@ -13,3 +20,11 @@ exports.version = function() {
exports.name = function() {
return exports.file().name
}

exports.owner = function() {
return repo()[1];
};

exports.repo = function() {
return repo()[2];
};
5 changes: 5 additions & 0 deletions gulpfile.js/tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ function release(callback) {
return;
}

if (!manifest.repo()) {
util.errorHandler('release')(new Error('Your package.json is missing the repository field.'));
return;
}

runSequence(
'changelog',
'bump',
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ gulp.task('tdd', function (callback) {
gulp.task('webdriver_update', webdriver_update);
gulp.task('webdriver_standalone', webdriver_standalone);

gulp.task('e2e', function(callback) {
gulp.task('e2e', ['webdriver_update'], function(callback) {
gulp.src(path.join(config.paths.tests, config.paths.e2e, '/**/*.{' + config.extensions.scripts + '}'))
.pipe(protractor({
configFile: path.resolve('protractor.conf.js'),
Expand Down

0 comments on commit 014b5cc

Please sign in to comment.