Merge pull request #19630 from karalabe/fix-commit-strings

internal/build: fix Travis and AppVeyor commit string injection
This commit is contained in:
Péter Szilágyi 2019-05-27 18:43:07 +03:00 committed by GitHub
commit c4de228e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ func Env() Environment {
case os.Getenv("CI") == "true" && os.Getenv("TRAVIS") == "true":
commit := os.Getenv("TRAVIS_PULL_REQUEST_SHA")
if commit == "" {
os.Getenv("TRAVIS_COMMIT")
commit = os.Getenv("TRAVIS_COMMIT")
}
return Environment{
Name: "travis",
@ -73,7 +73,7 @@ func Env() Environment {
case os.Getenv("CI") == "True" && os.Getenv("APPVEYOR") == "True":
commit := os.Getenv("APPVEYOR_PULL_REQUEST_HEAD_COMMIT")
if commit == "" {
os.Getenv("APPVEYOR_REPO_COMMIT")
commit = os.Getenv("APPVEYOR_REPO_COMMIT")
}
return Environment{
Name: "appveyor",