Add build data to sauce.

This commit is contained in:
John-David Dalton
2013-11-17 22:30:01 -08:00
parent 7d1baa8798
commit 416227a2a2

View File

@@ -1,7 +1,10 @@
;(function() { ;(function() {
'use strict'; 'use strict';
if (isFinite(process.env.TRAVIS_PULL_REQUEST)) { /** Environment shortcut */
var env = process.env;
if (isFinite(env.TRAVIS_PULL_REQUEST)) {
console.error('Testing skipped for pull requests'); console.error('Testing skipped for pull requests');
process.exit(0); process.exit(0);
} }
@@ -26,10 +29,11 @@
waitCount = -1; waitCount = -1;
/** Used as request `auth` and `options` values */ /** Used as request `auth` and `options` values */
var port = 8081, var accessKey = env.SAUCE_ACCESS_KEY,
username = process.env.SAUCE_USERNAME, build = env.TRAVIS_COMMIT,
accessKey = process.env.SAUCE_ACCESS_KEY, port = 8081,
tunnelId = 'lodash_' + process.env.TRAVIS_JOB_NUMBER; tunnelId = 'lodash_' + env.TRAVIS_JOB_NUMBER,
username = env.SAUCE_USERNAME;
var compatMode = process.argv.reduce(function(result, value) { var compatMode = process.argv.reduce(function(result, value) {
return optionToValue('compatMode', value) || result; return optionToValue('compatMode', value) || result;
@@ -236,6 +240,7 @@
*/ */
function runTests() { function runTests() {
var options = { var options = {
'build': build,
'framework': 'qunit', 'framework': 'qunit',
'name': sessionName, 'name': sessionName,
'public': 'public', 'public': 'public',
@@ -311,8 +316,8 @@
// create a web server for the local dir // create a web server for the local dir
var mount = ecstatic({ var mount = ecstatic({
'root': process.cwd(), 'cache': false,
'cache': false 'root': process.cwd()
}); });
http.createServer(function(req, res) { http.createServer(function(req, res) {