Skip to content

Commit

Permalink
Add bower install script and release scripts to jshint and pass lint
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Oct 7, 2013
1 parent fea6904 commit fc4ff93
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Expand Up @@ -66,7 +66,7 @@ module.exports = function( grunt ) {
options: srcHintOptions
},
grunt: {
src: [ "Gruntfile.js", "build/tasks/*" ],
src: [ "Gruntfile.js", "build/tasks/*", "build/{bower-install,release-notes,release}.js" ],
options: {
jshintrc: ".jshintrc"
}
Expand Down
2 changes: 1 addition & 1 deletion build/bower-install.js
Expand Up @@ -10,4 +10,4 @@ try {
process.exit( 0 );
}

spawn( "bower", [ "install" ], { stdio: 'inherit' } );
spawn( "bower", [ "install" ], { stdio: "inherit" } );
11 changes: 4 additions & 7 deletions build/release-notes.js
Expand Up @@ -3,10 +3,8 @@
* jQuery Release Note Generator
*/

var fs = require("fs"),
http = require("http"),
var http = require("http"),
extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g,
categories = [],
version = process.argv[2];

if ( !/^\d+\.\d+/.test( version ) ) {
Expand All @@ -27,13 +25,12 @@ http.request({
});

res.on( "end", function() {
var match,
file = data.join(""),
cur;
var match, cur, cat,
file = data.join("");

while ( (match = extract.exec( file )) ) {
if ( "#" + match[1] !== match[2] ) {
var cat = match[3];
cat = match[3];

if ( !cur || cur !== cat ) {
if ( cur ) {
Expand Down
12 changes: 6 additions & 6 deletions build/release.js
Expand Up @@ -102,7 +102,7 @@ function initialize( next ) {

console.log( "Current version is " + pkg.version + "; generating release " + releaseVersion );
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 );
if ( newver < oldver ) {
die( "Next version is older than current version!" );
Expand All @@ -113,7 +113,7 @@ function initialize( next ) {
}

function checkGitStatus( next ) {
git( [ "status" ], function( error, stdout, stderr ) {
git( [ "status" ], function( error, stdout ) {
var onBranch = ((stdout||"").match( /On branch (\S+)/ ) || [])[1];
if ( onBranch !== branch ) {
dieIfReal( "Branches don't match: Wanted " + branch + ", got " + onBranch );
Expand All @@ -136,7 +136,7 @@ function tagReleaseVersion( next ) {
}

function gruntBuild( next ) {
exec( gruntCmd, [], function( error, stdout ) {
exec( gruntCmd, [], function( error, stdout, stderr ) {
if ( error ) {
die( error + stderr );
}
Expand Down Expand Up @@ -219,10 +219,10 @@ function pushToGithub( next ) {

function steps() {
var cur = 0,
steps = arguments;
st = arguments;
(function next(){
process.nextTick(function(){
steps[ cur++ ]( next );
st[ cur++ ]( next );
});
})();
}
Expand Down Expand Up @@ -259,7 +259,7 @@ function makeArchive( cdn, files, fn ) {
return "dist/" + item.replace( /VER/g, releaseVersion );
});

exec( "md5sum", files, function( err, stdout, stderr ) {
exec( "md5sum", files, function( err, stdout ) {
fs.writeFileSync( md5file, stdout );
files.push( md5file );

Expand Down

1 comment on commit fc4ff93

@mgol
Copy link
Member

@mgol mgol commented on fc4ff93 Oct 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.