packtracker / webpack-plugin

A webpack plugin to report build statistics to packtracker.io
https://packtracker.io
MIT License
31 stars 4 forks source link

Auto Detect TravisCI #6

Closed delphiactual closed 5 years ago

delphiactual commented 5 years ago

Something along the lines of

let CI = {}

if (process.env.TRAVIS === "true") {
   CI.BRANCH = process.env.TRAVIS_PULL_REQUEST_BRANCH || process.env.TRAVIS_BRANCH
   CI.COMMIT = process.env.TRAVIS_PULL_REQUEST_SHA || process.env.TRAVIS_COMMIT
}

https://docs.travis-ci.com/user/environment-variables/#convenience-variables

Other CI could be added after a decision is made in the best way to add these.