File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import (
14
14
)
15
15
16
16
var (
17
- flCommitRange = flag .String ("range" , "" , "use this commit range instead" )
17
+ flCommitRange = flag .String ("range" , "" , "use this commit range instead (implies -no-travis) " )
18
18
flListRules = flag .Bool ("list-rules" , false , "list the rules registered" )
19
19
flRun = flag .String ("run" , "" , "comma delimited list of rules to run. Defaults to all." )
20
20
flVerbose = flag .Bool ("v" , false , "verbose" )
@@ -48,11 +48,13 @@ func main() {
48
48
}
49
49
50
50
var commitRange = * flCommitRange
51
- if strings .ToLower (os .Getenv ("TRAVIS" )) == "true" && ! * flNoTravis {
52
- if os .Getenv ("TRAVIS_COMMIT_RANGE" ) != "" {
53
- commitRange = os .Getenv ("TRAVIS_COMMIT_RANGE" )
54
- } else if os .Getenv ("TRAVIS_COMMIT" ) != "" {
55
- commitRange = os .Getenv ("TRAVIS_COMMIT" )
51
+ if commitRange == "" {
52
+ if strings .ToLower (os .Getenv ("TRAVIS" )) == "true" && ! * flNoTravis {
53
+ if os .Getenv ("TRAVIS_COMMIT_RANGE" ) != "" {
54
+ commitRange = os .Getenv ("TRAVIS_COMMIT_RANGE" )
55
+ } else if os .Getenv ("TRAVIS_COMMIT" ) != "" {
56
+ commitRange = os .Getenv ("TRAVIS_COMMIT" )
57
+ }
56
58
}
57
59
}
58
60
You can’t perform that action at this time.
0 commit comments