2015-01-28 19:37:29 +00:00
|
|
|
|
2013-12-20 22:13:48 +00:00
|
|
|
module.exports = function( Release ) {
|
|
|
|
|
|
|
|
var
|
2015-01-28 19:37:29 +00:00
|
|
|
files = [ "dist/jquery.js", "dist/jquery.min.js", "dist/jquery.min.map" ],
|
|
|
|
cdn = require( "./release/cdn" ),
|
|
|
|
dist = require( "./release/dist" ),
|
|
|
|
ensureSizzle = require( "./release/ensure-sizzle" ),
|
2012-08-09 19:22:15 +00:00
|
|
|
|
2015-01-28 19:37:29 +00:00
|
|
|
npmTags = Release.npmTags,
|
|
|
|
createTag = Release._createTag;
|
2013-11-14 02:25:37 +00:00
|
|
|
|
2013-12-20 22:13:48 +00:00
|
|
|
Release.define({
|
2014-01-10 12:45:01 +00:00
|
|
|
npmPublish: true,
|
2015-01-28 19:37:29 +00:00
|
|
|
issueTracker: "github",
|
2014-05-23 16:45:51 +00:00
|
|
|
/**
|
|
|
|
* Ensure the repo is in a proper state before release
|
|
|
|
* @param {Function} callback
|
|
|
|
*/
|
|
|
|
checkRepoState: function( callback ) {
|
|
|
|
ensureSizzle( Release, callback );
|
|
|
|
},
|
2015-01-28 19:37:29 +00:00
|
|
|
/**
|
|
|
|
* The tag for compat is different
|
|
|
|
* This sets a different new version for the source repo,
|
|
|
|
* but after building with the correct tag
|
2015-05-06 21:36:47 +00:00
|
|
|
* e.g. 3.0.0+compat
|
2015-01-28 19:37:29 +00:00
|
|
|
*/
|
|
|
|
_createTag: function( paths ) {
|
|
|
|
Release.distVersion = Release.newVersion;
|
|
|
|
Release.newVersion = Release.newVersion
|
2015-05-06 21:36:47 +00:00
|
|
|
.replace( /(\d+\.\d+\.\d+)/, "$1+compat" );
|
2015-01-28 19:37:29 +00:00
|
|
|
return createTag( paths );
|
|
|
|
},
|
2013-12-20 22:13:48 +00:00
|
|
|
/**
|
|
|
|
* Generates any release artifacts that should be included in the release.
|
|
|
|
* The callback must be invoked with an array of files that should be
|
|
|
|
* committed before creating the tag.
|
|
|
|
* @param {Function} callback
|
|
|
|
*/
|
|
|
|
generateArtifacts: function( callback ) {
|
2014-03-18 15:48:21 +00:00
|
|
|
Release.exec( "grunt", "Grunt command failed" );
|
2015-01-28 19:37:29 +00:00
|
|
|
cdn.makeReleaseCopies( Release );
|
|
|
|
callback( files );
|
2013-12-20 22:13:48 +00:00
|
|
|
},
|
|
|
|
/**
|
2015-01-28 19:37:29 +00:00
|
|
|
* Acts as insertion point for restoring Release.dir.repo
|
|
|
|
* It was changed to reuse npm publish code in jquery-release
|
|
|
|
* for publishing the distribution repo instead
|
2013-12-20 22:13:48 +00:00
|
|
|
*/
|
2015-01-28 19:37:29 +00:00
|
|
|
npmTags: function() {
|
|
|
|
// origRepo is not defined if dist was skipped
|
|
|
|
Release.dir.repo = Release.dir.origRepo || Release.dir.repo;
|
|
|
|
return npmTags();
|
2013-12-20 22:13:48 +00:00
|
|
|
},
|
|
|
|
/**
|
2015-01-28 19:37:29 +00:00
|
|
|
* Publish to distribution repo and npm
|
|
|
|
* @param {Function} callback
|
2013-12-20 22:13:48 +00:00
|
|
|
*/
|
2015-01-28 19:37:29 +00:00
|
|
|
dist: function( callback ) {
|
2015-01-30 00:21:39 +00:00
|
|
|
cdn.makeArchives( Release, function() {
|
|
|
|
dist( Release, callback );
|
|
|
|
});
|
2013-12-20 22:13:48 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
2014-03-18 15:48:21 +00:00
|
|
|
|
|
|
|
module.exports.dependencies = [
|
2015-01-30 00:21:39 +00:00
|
|
|
"archiver@0.14.2",
|
2015-01-28 19:37:29 +00:00
|
|
|
"shelljs@0.2.6",
|
|
|
|
"npm@2.3.0"
|
2014-03-18 15:48:21 +00:00
|
|
|
];
|