mirror of
https://github.com/vbatts/git-validation.git
synced 2025-07-02 07:08:29 +00:00
main: default travis commit range is unreliable
https://github.com/opencontainers/runc/pull/1378#issuecomment-287920287 points to an alternate approach. Reported-by: Mrunal Patel <mrunalp@gmail.com> Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
3fd57e3bf5
commit
8a12a8fc7a
2 changed files with 10 additions and 4 deletions
4
main.go
4
main.go
|
@ -50,8 +50,8 @@ func main() {
|
|||
var commitRange = *flCommitRange
|
||||
if commitRange == "" {
|
||||
if strings.ToLower(os.Getenv("TRAVIS")) == "true" && !*flNoTravis {
|
||||
if os.Getenv("TRAVIS_COMMIT_RANGE") != "" {
|
||||
commitRange = os.Getenv("TRAVIS_COMMIT_RANGE")
|
||||
if os.Getenv("TRAVIS_BRANCH") != "" {
|
||||
commitRange = fmt.Sprintf("%s..FETCH_HEAD", os.Getenv("TRAVIS_BRANCH"))
|
||||
} else if os.Getenv("TRAVIS_COMMIT") != "" {
|
||||
commitRange = os.Getenv("TRAVIS_COMMIT")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue