Skip to content

Commit 82595cb

Browse files
committed
Merge pull request #108 from patocallaghan/fix_config_build
Allow to add custom build string
2 parents 989ed0c + c6a1048 commit 82595cb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ To run browser tests on BrowserStack infrastructure, you need to create a `brows
2929
* `test_framework`: Specify test framework which will run the tests. Currently supporting qunit, jasmine, jasmine2 and mocha.
3030
* `timeout`: Specify worker timeout with BrowserStack.
3131
* `browsers`: A list of browsers on which tests are to be run. Find a [list of all supported browsers and platforms on browerstack.com](http://www.browserstack.com/list-of-browsers-and-platforms?product=live).
32+
* `build`: A string to identify your test run in Browserstack. In `TRAVIS` setup `TRAVIS_COMMIT` will be the default identifier.
3233
* `proxy`: Specify a proxy to use for the local tunnel. Object with `host`, `port`, `username` and `password` properties.
3334

3435
A sample configuration file:

lib/config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ if (!config.project) {
4747

4848
var commit_id = process.env.TRAVIS_COMMIT;
4949

50-
if (commit_id) {
51-
config.build = 'Commit-' + commit_id.slice(0, commit_id.length / 2);
52-
} {
53-
config.build = 'Local run, ' + new Date().toISOString();
50+
if(!config.build) {
51+
config.build = commit_id ? 'Commit-' + commit_id.slice(0, commit_id.length / 2) : 'Local run, ' + new Date().toISOString();
5452
}
5553

5654
['username', 'key', 'browsers', 'test_path'].forEach(function(param) {

0 commit comments

Comments
 (0)