aboutsummaryrefslogtreecommitdiff
path: root/lib/getOptions.js
diff options
context:
space:
mode:
authorcainus <[email protected]>2013-06-22 13:54:07 -0700
committercainus <[email protected]>2013-06-22 13:54:07 -0700
commite3dd6fb7fe9f025a667d859b655e54032aee5fa1 (patch)
tree392bf47b3dffdabae70cf2eb808df23c623e8f81 /lib/getOptions.js
parent10c62543ac595ed2205172f76aa6b4018b7f6c24 (diff)
downloadnode-coveralls-e3dd6fb7fe9f025a667d859b655e54032aee5fa1.tar.xz
node-coveralls-e3dd6fb7fe9f025a667d859b655e54032aee5fa1.zip
pass on all arguments to coveralls (https://coveralls.io/docs/api_reference).
Diffstat (limited to 'lib/getOptions.js')
-rw-r--r--lib/getOptions.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/getOptions.js b/lib/getOptions.js
index 9e6894d..fa294b1 100644
--- a/lib/getOptions.js
+++ b/lib/getOptions.js
@@ -17,6 +17,22 @@ var getOptions = function(){
}
}
+ if (process.env.git){
+ options.git = process.env.COVERALLS_GIT;
+ }
+ if (process.env.service_job_id){
+ options.git = process.env.COVERALLS_SERVICE_JOB_ID;
+ }
+
+ options.run_at = process.env.COVERALLS_RUN_AT || JSON.stringify(new Date()).slice(1, -1);
+ if (process.env.service_name){
+ options.service_name = service_name;
+ }
+ if (process.env.TRAVIS){
+ options.service_name = 'travis-ci';
+ options.service_job_id = process.env.TRAVIS_JOB_ID;
+ }
+
// try to get the repo token as an environment variable
if (process.env.COVERALLS_REPO_TOKEN) {
options.repo_token = process.env.COVERALLS_REPO_TOKEN;