diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index a17dc363b..2a5b327ad 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -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}} diff --git a/.goreleaser.yml b/.goreleaser.yml index dbddbb888..7782698a1 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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 diff --git a/main.go b/main.go index 38113f045..7aab6377b 100644 --- a/main.go +++ b/main.go @@ -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 }