Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc: Comments in released files should contain the correct version #324

Merged
merged 1 commit into from
Feb 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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