mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Add bower install script and release scripts to jshint and pass lint
This commit is contained in:
parent
fea6904d46
commit
fc4ff9315d
@ -66,7 +66,7 @@ module.exports = function( grunt ) {
|
|||||||
options: srcHintOptions
|
options: srcHintOptions
|
||||||
},
|
},
|
||||||
grunt: {
|
grunt: {
|
||||||
src: [ "Gruntfile.js", "build/tasks/*" ],
|
src: [ "Gruntfile.js", "build/tasks/*", "build/{bower-install,release-notes,release}.js" ],
|
||||||
options: {
|
options: {
|
||||||
jshintrc: ".jshintrc"
|
jshintrc: ".jshintrc"
|
||||||
}
|
}
|
||||||
|
@ -10,4 +10,4 @@ try {
|
|||||||
process.exit( 0 );
|
process.exit( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
spawn( "bower", [ "install" ], { stdio: 'inherit' } );
|
spawn( "bower", [ "install" ], { stdio: "inherit" } );
|
||||||
|
@ -3,10 +3,8 @@
|
|||||||
* jQuery Release Note Generator
|
* jQuery Release Note Generator
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var fs = require("fs"),
|
var http = require("http"),
|
||||||
http = require("http"),
|
|
||||||
extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g,
|
extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g,
|
||||||
categories = [],
|
|
||||||
version = process.argv[2];
|
version = process.argv[2];
|
||||||
|
|
||||||
if ( !/^\d+\.\d+/.test( version ) ) {
|
if ( !/^\d+\.\d+/.test( version ) ) {
|
||||||
@ -27,13 +25,12 @@ http.request({
|
|||||||
});
|
});
|
||||||
|
|
||||||
res.on( "end", function() {
|
res.on( "end", function() {
|
||||||
var match,
|
var match, cur, cat,
|
||||||
file = data.join(""),
|
file = data.join("");
|
||||||
cur;
|
|
||||||
|
|
||||||
while ( (match = extract.exec( file )) ) {
|
while ( (match = extract.exec( file )) ) {
|
||||||
if ( "#" + match[1] !== match[2] ) {
|
if ( "#" + match[1] !== match[2] ) {
|
||||||
var cat = match[3];
|
cat = match[3];
|
||||||
|
|
||||||
if ( !cur || cur !== cat ) {
|
if ( !cur || cur !== cat ) {
|
||||||
if ( cur ) {
|
if ( cur ) {
|
||||||
|
@ -102,7 +102,7 @@ function initialize( next ) {
|
|||||||
|
|
||||||
console.log( "Current version is " + pkg.version + "; generating release " + releaseVersion );
|
console.log( "Current version is " + pkg.version + "; generating release " + releaseVersion );
|
||||||
version = pkg.version.match( rsemver );
|
version = pkg.version.match( rsemver );
|
||||||
oldver = ( +version[1] ) * 10000 + ( +version[2] * 100 ) + ( +version[3] )
|
oldver = ( +version[1] ) * 10000 + ( +version[2] * 100 ) + ( +version[3] );
|
||||||
newver = ( +major ) * 10000 + ( +minor * 100 ) + ( +patch );
|
newver = ( +major ) * 10000 + ( +minor * 100 ) + ( +patch );
|
||||||
if ( newver < oldver ) {
|
if ( newver < oldver ) {
|
||||||
die( "Next version is older than current version!" );
|
die( "Next version is older than current version!" );
|
||||||
@ -113,7 +113,7 @@ function initialize( next ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkGitStatus( next ) {
|
function checkGitStatus( next ) {
|
||||||
git( [ "status" ], function( error, stdout, stderr ) {
|
git( [ "status" ], function( error, stdout ) {
|
||||||
var onBranch = ((stdout||"").match( /On branch (\S+)/ ) || [])[1];
|
var onBranch = ((stdout||"").match( /On branch (\S+)/ ) || [])[1];
|
||||||
if ( onBranch !== branch ) {
|
if ( onBranch !== branch ) {
|
||||||
dieIfReal( "Branches don't match: Wanted " + branch + ", got " + onBranch );
|
dieIfReal( "Branches don't match: Wanted " + branch + ", got " + onBranch );
|
||||||
@ -136,7 +136,7 @@ function tagReleaseVersion( next ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gruntBuild( next ) {
|
function gruntBuild( next ) {
|
||||||
exec( gruntCmd, [], function( error, stdout ) {
|
exec( gruntCmd, [], function( error, stdout, stderr ) {
|
||||||
if ( error ) {
|
if ( error ) {
|
||||||
die( error + stderr );
|
die( error + stderr );
|
||||||
}
|
}
|
||||||
@ -219,10 +219,10 @@ function pushToGithub( next ) {
|
|||||||
|
|
||||||
function steps() {
|
function steps() {
|
||||||
var cur = 0,
|
var cur = 0,
|
||||||
steps = arguments;
|
st = arguments;
|
||||||
(function next(){
|
(function next(){
|
||||||
process.nextTick(function(){
|
process.nextTick(function(){
|
||||||
steps[ cur++ ]( next );
|
st[ cur++ ]( next );
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ function makeArchive( cdn, files, fn ) {
|
|||||||
return "dist/" + item.replace( /VER/g, releaseVersion );
|
return "dist/" + item.replace( /VER/g, releaseVersion );
|
||||||
});
|
});
|
||||||
|
|
||||||
exec( "md5sum", files, function( err, stdout, stderr ) {
|
exec( "md5sum", files, function( err, stdout ) {
|
||||||
fs.writeFileSync( md5file, stdout );
|
fs.writeFileSync( md5file, stdout );
|
||||||
files.push( md5file );
|
files.push( md5file );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user