Skip to content

Commit

Permalink
Merge pull request #324 from liferay/misc-fix-comment-version
Browse files Browse the repository at this point in the history
Misc: Comments in released files should contain the correct version
  • Loading branch information
natecavanaugh authored Feb 21, 2017
2 parents 98b4440 + 958d20a commit 88cbf3c
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,27 @@ module.exports = function(gulp, plugins, _, config) {
return GIT_REMOTE;
};

var currentVersion = require('../package.json').version;

var releaseType = (function() {
var types = ['major', 'minor', 'patch'];

var type = _.find(
types,
function(item, index) {
return argv[item];
}
);

if (!type) {
type = 'patch';
}

return type;
}());

var bumpedVersion = semver.inc(currentVersion, releaseType);

gulp.task(
'release:clean',
function() {
Expand Down Expand Up @@ -62,6 +83,8 @@ module.exports = function(gulp, plugins, _, config) {
}
);

license.metadata.version = bumpedVersion;

return gulp.src([
'src/fonts/**/*',
'src/images/icons/*',
Expand Down Expand Up @@ -92,24 +115,6 @@ module.exports = function(gulp, plugins, _, config) {
'release:git',
function(done) {
var branchName = 'bower-staging-' + Math.random().toString(16).replace(/[^0-9a-fA-F]/g, '');

var currentVersion = require('../package.json').version;

var types = ['major', 'minor', 'patch'];

var type = _.find(
types,
function(item, index) {
return argv[item];
}
);

if (!type) {
type = 'patch';
}

var bumpedVersion = semver.inc(currentVersion, type);

var browserCommitMessage = 'Browser files for v' + bumpedVersion;
var mergeCommitMessage = 'Merging master@v' + bumpedVersion + ' into develop';
var rebuildCommitMessage = 'Rebuild v' + bumpedVersion;
Expand Down

0 comments on commit 88cbf3c

Please sign in to comment.