From f0bced30bb44a3185bf3bb15c22dfa7f07dd668b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 27 May 2019 18:41:47 +0300 Subject: [PATCH] internal/build: fix Travis and AppVeyor commit string injection --- internal/build/env.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/build/env.go b/internal/build/env.go index b7aa0f122..95f00035d 100644 --- a/internal/build/env.go +++ b/internal/build/env.go @@ -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",