Skip to content

Commit fb7ea2c

Browse files
committed
Don't use env vars!
1 parent f8f0aa8 commit fb7ea2c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/releases.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
version: latest
2323
args: release
2424
env:
25-
APP_ENV: production
2625
GH_OAUTH_CLIENT_ID: 178c6fc778ccc68e1d6a
2726
GH_OAUTH_CLIENT_SECRET: ${{secrets.OAUTH_CLIENT_SECRET}}
2827
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ builds:
99
- -s -w -X github.com/github/gh-cli/command.Version={{.Version}} -X github.com/github/gh-cli/command.BuildDate={{.Date}}
1010
- -X github.com/github/gh-cli/context.oauthClientID={{.Env.GH_OAUTH_CLIENT_ID}}
1111
- -X github.com/github/gh-cli/context.oauthClientSecret={{.Env.GH_OAUTH_CLIENT_SECRET}}
12+
- -X github.com/github/gh-cli.updaterEnabled=yes
1213
goos:
1314
- linux
1415
- darwin

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99
"github.com/github/gh-cli/update"
1010
)
1111

12+
var updaterEnabled = "no"
13+
1214
func main() {
1315
updateMessageChan := make(chan *string)
1416
go updateInBackground(updateMessageChan)
@@ -29,7 +31,7 @@ func main() {
2931
}
3032

3133
func updateInBackground(updateMessageChan chan *string) {
32-
if os.Getenv("APP_ENV") != "production" {
34+
if updaterEnabled != "yes" {
3335
updateMessageChan <- nil
3436
return
3537
}

0 commit comments

Comments
 (0)