Skip to content
Permalink
Browse files

Build: Style fixes

  • Loading branch information
jzaefferer committed Mar 6, 2015
1 parent ac2a111 commit ea999e4776bb0fe67b1eff702f09fc5cb878bfe0
Showing with 39 additions and 39 deletions.
  1. +11 −11 build/release.js
  2. +5 −5 build/tasks/build.js
  3. +23 −23 build/tasks/testswarm.js
@@ -9,7 +9,7 @@ function replaceAtVersion() {
var matches = [];

function recurse( folder ) {
fs.readdirSync( folder ).forEach(function( fileName ) {
fs.readdirSync( folder ).forEach( function( fileName ) {
var content,
fullPath = folder + "/" + fileName;
if ( fs.statSync( fullPath ).isDirectory() ) {
@@ -18,13 +18,13 @@ function replaceAtVersion() {
}
content = fs.readFileSync( fullPath, {
encoding: "utf-8"
});
} );
if ( !/@VERSION/.test( content ) ) {
return;
}
matches.push( fullPath );
fs.writeFileSync( fullPath, content.replace( /@VERSION/g, Release.newVersion ) );
});
} );
}

[ "ui", "themes" ].forEach( recurse );
@@ -41,7 +41,7 @@ function buildCDNPackage( callback ) {
builder = new downloadBuilder.Builder( jqueryUi, ":all:" ),
packer = new downloadBuilder.ThemesPacker( builder, {
includeJs: true
}),
} ),
target = "../" + jqueryUi.pkg.name + "-" + jqueryUi.pkg.version + "-cdn.zip";

// Zip dir structure must be flat, override default base folder
@@ -51,30 +51,30 @@ function buildCDNPackage( callback ) {
Release.abort( "Failed to zip CDN package", error );
}
callback();
});
} );
}

Release.define({
Release.define( {
issueTracker: "trac",
contributorReportId: 22,
changelogShell: function() {
var monthNames = [ "January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December" ],
"August", "September", "October", "November", "December" ],
now = new Date();
return "<script>{\n\t\"title\": \"jQuery UI " + Release.newVersion + " Changelog\"\n" +
"}</script>\n\nReleased on " + monthNames[ now.getMonth() ] + " " + now.getDate() + ", " + now.getFullYear() + "\n\n";
},
generateArtifacts: function( fn ) {
var files = replaceAtVersion();

buildCDNPackage(function copyCdnFiles() {
buildCDNPackage( function copyCdnFiles() {
var zipFile = shell.ls( "../jquery*-cdn.zip" )[ 0 ],
tmpFolder = "../tmp-zip-output",
unzipCommand = "unzip -o " + zipFile + " -d " + tmpFolder;

console.log( "Unzipping for dist/cdn copies" );
shell.mkdir( "-p", tmpFolder );
Release.exec({
Release.exec( {
command: unzipCommand,
silent: true
}, "Failed to unzip cdn files" );
@@ -83,9 +83,9 @@ Release.define({
shell.cp( tmpFolder + "/jquery-ui*.js", "dist/cdn" );
shell.cp( "-r", tmpFolder + "/themes", "dist/cdn" );
fn( files );
});
} );
}
});
} );

};

@@ -4,12 +4,12 @@ module.exports = function( grunt ) {

grunt.registerTask( "clean", function() {
require( "rimraf" ).sync( "dist" );
});
} );

grunt.registerTask( "asciilint", function() {
var valid = true,
files = grunt.file.expand({ filter: "isFile" }, "ui/*.js" );
files.forEach(function( filename ) {
files = grunt.file.expand( { filter: "isFile" }, "ui/*.js" );
files.forEach( function( filename ) {
var i, c,
text = grunt.file.read( filename );

@@ -32,11 +32,11 @@ grunt.registerTask( "asciilint", function() {
}
valid = false;
}
});
} );
if ( valid ) {
grunt.log.ok( files.length + " files lint free." );
}
return valid;
});
} );

};
@@ -48,26 +48,26 @@ function submit( commit, runs, configFile, extra, done ) {
runs[ testName ] = config.testUrl + commit + "/tests/unit/" + runs[ testName ];
}

testswarm.createClient({
testswarm.createClient( {
url: config.swarmUrl
})
.addReporter( testswarm.reporters.cli )
.auth({
id: config.authUsername,
token: config.authToken
})
.addjob({
name: "Commit <a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra,
runs: runs,
runMax: config.runMax,
browserSets: config.browserSets,
timeout: 1000 * 60 * 30
}, function( error, passed ) {
if ( error ) {
grunt.log.error( error );
}
done( passed );
});
} )
.addReporter( testswarm.reporters.cli )
.auth( {
id: config.authUsername,
token: config.authToken
} )
.addjob( {
name: "Commit <a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + extra,
runs: runs,
runMax: config.runMax,
browserSets: config.browserSets,
timeout: 1000 * 60 * 30
}, function( error, passed ) {
if ( error ) {
grunt.log.error( error );
}
done( passed );
} );
}

grunt.registerTask( "testswarm", function( commit, configFile ) {
@@ -77,16 +77,16 @@ grunt.registerTask( "testswarm", function( commit, configFile ) {
latestTests[ test ] = tests[ test ] + "?nojshint=true";
}
submit( commit, latestTests, configFile, "", this.async() );
});
} );

grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, minor ) {
var allTests = {};
versions[ minor ].split(" ").forEach(function( version ) {
versions[ minor ].split( " " ).forEach( function( version ) {
for ( var test in tests ) {
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
}
});
} );
submit( commit, allTests, configFile, "core " + minor, this.async() );
});
} );

};

0 comments on commit ea999e4

Please sign in to comment.
You can’t perform that action at this time.