Don't use env vars!
This commit is contained in:
parent
f8f0aa829e
commit
fb7ea2c6a6
3 changed files with 4 additions and 2 deletions
1
.github/workflows/releases.yml
vendored
1
.github/workflows/releases.yml
vendored
|
|
@ -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}}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
4
main.go
4
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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue