Skip to content

Commit

Permalink
Don't use env vars!
Browse files Browse the repository at this point in the history
  • Loading branch information
probablycorey committed Dec 3, 2019
1 parent f8f0aa8 commit fb7ea2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"github.com/github/gh-cli/update"
)

var updaterEnabled = "no"

func main() {
updateMessageChan := make(chan *string)
go updateInBackground(updateMessageChan)
Expand All @@ -29,7 +31,7 @@ func main() {
}

func updateInBackground(updateMessageChan chan *string) {
if os.Getenv("APP_ENV") != "production" {
if updaterEnabled != "yes" {
updateMessageChan <- nil
return
}
Expand Down

0 comments on commit fb7ea2c

Please sign in to comment.