File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,21 @@ A sample configuration file:
88
88
}
89
89
90
90
91
+ ### Enviroment variables
92
+
93
+ * ` BROWSERSTACK_USER ` :
94
+ BrowserStack user name.
95
+
96
+ * ` BROWSERSTACK_KEY ` :
97
+ BrowserStack key.
98
+
99
+ * ` TUNNEL_ID ` :
100
+ Identifier for the current instance of the tunnel process. In ` TRAVIS ` setup ` TRAVIS_JOB_ID ` will be the default identifier.
101
+
102
+ * ` BROWSERSTACK_JSON ` :
103
+ Path to the browserstack.json file. If null, ` browserstack.json ` in the root directory will be used.
104
+
105
+
91
106
### Secure Information
92
107
93
108
To prevent checking in the BrowserStack ` username ` and ` key ` in your
Original file line number Diff line number Diff line change @@ -2,8 +2,12 @@ var path = require('path'),
2
2
fs = require ( 'fs' ) ;
3
3
var pwd = process . cwd ( ) ;
4
4
5
+ config_path = process . env . BROWSERSTACK_JSON || 'browserstack.json' ;
6
+ config_path = path . resolve ( path . relative ( process . cwd ( ) , config_path ) ) ;
7
+ console . log ( "Using config:" , config_path ) ;
8
+
5
9
try {
6
- var config = require ( process . cwd ( ) + '/browserstack' ) ;
10
+ var config = require ( config_path ) ;
7
11
} catch ( e ) {
8
12
if ( e . code == 'MODULE_NOT_FOUND' ) {
9
13
console . log ( 'Configuration file `browserstack.json` is missing.' ) ;
You can’t perform that action at this time.
0 commit comments