File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import (
1414)
1515
1616var (
17- flCommitRange = flag .String ("range" , "" , "use this commit range instead" )
17+ flCommitRange = flag .String ("range" , "" , "use this commit range instead (implies -no-travis) " )
1818 flListRules = flag .Bool ("list-rules" , false , "list the rules registered" )
1919 flRun = flag .String ("run" , "" , "comma delimited list of rules to run. Defaults to all." )
2020 flVerbose = flag .Bool ("v" , false , "verbose" )
@@ -48,11 +48,13 @@ func main() {
4848 }
4949
5050 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+ }
5658 }
5759 }
5860
You can’t perform that action at this time.
0 commit comments