Don't use env vars!

This commit is contained in:
Corey Johnson 2019-12-03 12:16:29 -08:00
parent f8f0aa829e
commit fb7ea2c6a6
3 changed files with 4 additions and 2 deletions

View file

@ -22,7 +22,6 @@ jobs:
version: latest
args: release
env:
APP_ENV: production
GH_OAUTH_CLIENT_ID: 178c6fc778ccc68e1d6a
GH_OAUTH_CLIENT_SECRET: ${{secrets.OAUTH_CLIENT_SECRET}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

View file

@ -9,6 +9,7 @@ builds:
- -s -w -X github.com/github/gh-cli/command.Version={{.Version}} -X github.com/github/gh-cli/command.BuildDate={{.Date}}
- -X github.com/github/gh-cli/context.oauthClientID={{.Env.GH_OAUTH_CLIENT_ID}}
- -X github.com/github/gh-cli/context.oauthClientSecret={{.Env.GH_OAUTH_CLIENT_SECRET}}
- -X github.com/github/gh-cli.updaterEnabled=yes
goos:
- linux
- darwin

View file

@ -9,6 +9,8 @@ import (
"github.com/github/gh-cli/update"
)
var updaterEnabled = "no"
func main() {
updateMessageChan := make(chan *string)
go updateInBackground(updateMessageChan)
@ -29,7 +31,7 @@ func main() {
}
func updateInBackground(updateMessageChan chan *string) {
if os.Getenv("APP_ENV") != "production" {
if updaterEnabled != "yes" {
updateMessageChan <- nil
return
}