Skip to content
Open
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
19 changes: 3 additions & 16 deletions lib/repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var fs = require( "fs" ),
module.exports = function( Release ) {

Release.define( {
_jsonFiles: [ "package.json", "package-lock.json", "bower.json" ],
_jsonFiles: [ "package.json", "package-lock.json" ],

_cloneRepo: function() {
var releaseDependencies, projectRelease;
Expand Down Expand Up @@ -142,20 +142,8 @@ Release.define( {
Release._writeJSON( "package.json", json );
},

_versionJSON: function( fileName, version ) {
if ( !fs.existsSync( Release.dir.repo + "/" + fileName ) ) {
return;
}
console.log( "Updating " + fileName + "..." );
var json = Release._readJSON( fileName );
json.version = version;
Release._writeJSON( fileName, json );
},

_setVersion: function( version ) {
Release._jsonFiles.forEach( function( file ) {
Release._versionJSON( file, version );
} );
Release.exec( "npm version " + version + " --no-git-tag-version" );
},

_getVersions: function() {
Expand Down Expand Up @@ -272,8 +260,7 @@ Release.define( {
"Error checking out " + Release.branch + " branch." );

// Update only canonical version
Release._versionJSON( "package.json", Release.nextVersion );
Release._versionJSON( "package-lock.json", Release.nextVersion );
Release._setVersion( Release.nextVersion );

console.log( "Committing version update..." );
Release.exec( "git commit -am \"Build: Updating the " + Release.branch +
Expand Down