Showing with 54 additions and 5 deletions.
  1. +2 −1 AUTHORS.txt
  2. +2 −2 Gruntfile.js
  3. +40 −0 build/ensure-sizzle.js
  4. +1 −2 build/release-notes.js
  5. +8 −0 build/release.js
  6. +1 −0 package.json
@@ -207,9 +207,10 @@ cjqed <christopherjonesqed@gmail.com>
Forbes Lindesay <forbes@lindesay.co.uk>
John Paul <john@johnkpaul.com>
S. Andrew Sheppard <andrew@wq.io>
Leonardo Balter <leonardo.balter@gmail.com>
Roman Reiß <me@silverwind.io>
Benjy Cui <benjytrys@gmail.com>
Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
John Hoven <hovenj@gmail.com>
Christian Kosmowski <ksmwsk@gmail.com>

Liang Peng <poppinlp@gmail.com>
@@ -81,8 +81,7 @@ module.exports = function( grunt ) {
jshint: {
all: {
src: [
"src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/tasks/*",
"build/{bower-install,release-notes,release}.js"
"src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js"
],
options: {
jshintrc: true
@@ -99,6 +98,7 @@ module.exports = function( grunt ) {

// Right know, check only test helpers
test: [ "test/data/testrunner.js", "test/data/testinit.js" ],
release: "build/*.js",
tasks: "build/tasks/*.js"
},
testswarm: {
@@ -0,0 +1,40 @@
var fs = require( "fs" ),
bower = require( "grunt-bowercopy/node_modules/bower" ),
sizzleLoc = __dirname + "/../src/sizzle/dist/sizzle.js",
rversion = /Engine v(\d+\.\d+\.\d+(?:-\w+)?)/;

/**
* Retrieve the latest tag of Sizzle from bower
* @param {Function(string)} callback
*/
function getLatestSizzle( callback ) {
bower.commands.info( "sizzle", "version" )
.on( "end", callback );
}

/**
* Ensure the /src folder has the latest tag of Sizzle
* @param {Object} Release
* @param {Function} callback
*/
function ensureSizzle( Release, callback ) {
console.log();
console.log( "Checking Sizzle version..." );
getLatestSizzle(function( latest ) {
var match = rversion.exec( fs.readFileSync( sizzleLoc, "utf8" ) ),
version = match ? match[ 1 ] : "Not Found";

if ( version !== latest ) {
console.log(
"The Sizzle version in the src folder (" + version.red +
") is not the latest tag (" + latest.green + ")."
);
Release.confirm( callback );
} else {
console.log( "Sizzle is latest (" + latest.green + ")" );
callback();
}
});
}

module.exports = ensureSizzle;
@@ -17,7 +17,7 @@ http.request({
port: 80,
method: "GET",
path: "/query?status=closed&resolution=fixed&max=400&component=!web&order=component&milestone=" + version
}, function (res) {
}, function( res ) {
var data = [];

res.on( "data", function( chunk ) {
@@ -53,4 +53,3 @@ http.request({

});
}).end();

@@ -3,6 +3,7 @@ module.exports = function( Release ) {
var
fs = require( "fs" ),
shell = require( "shelljs" ),
ensureSizzle = require( "./ensure-sizzle" ),

devFile = "dist/jquery.js",
minFile = "dist/jquery.min.js",
@@ -118,6 +119,13 @@ module.exports = function( Release ) {
},
issueTracker: "trac",
contributorReportId: 508,
/**
* Ensure the repo is in a proper state before release
* @param {Function} callback
*/
checkRepoState: function( callback ) {
ensureSizzle( Release, callback );
},
/**
* Generates any release artifacts that should be included in the release.
* The callback must be invoked with an array of files that should be
@@ -30,6 +30,7 @@
],
"dependencies": {},
"devDependencies": {
"colors": "^0.6.2",
"commitplease": "1.7.0",
"grunt": "0.4.2",
"grunt-bowercopy": "0.7.1",