From c108ce0a296e8042062cb0821333d871de5d3546 Mon Sep 17 00:00:00 2001 From: "Sean E. Russell" Date: Thu, 22 May 2025 10:29:55 -0500 Subject: [PATCH] gogio: read -signpass from environment variable if it isn't provided as an argument Signed-off-by: Elias Naur --- gogio/build_info.go | 6 +++++- gogio/help.go | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gogio/build_info.go b/gogio/build_info.go index 3dd6cdb..f168330 100644 --- a/gogio/build_info.go +++ b/gogio/build_info.go @@ -56,6 +56,10 @@ func newBuildInfo(pkgPath string) (*buildInfo, error) { if err != nil { return nil, err } + sp := *signPass + if sp == "" { + sp = os.Getenv("GOGIO_SIGNPASS") + } bi := &buildInfo{ appID: appID, archs: getArchs(), @@ -70,7 +74,7 @@ func newBuildInfo(pkgPath string) (*buildInfo, error) { target: *target, version: ver, key: *signKey, - password: *signPass, + password: sp, notaryAppleID: *notaryID, notaryPassword: *notaryPass, notaryTeamID: *notaryTeamID, diff --git a/gogio/help.go b/gogio/help.go index 00ccc29..d6f6554 100644 --- a/gogio/help.go +++ b/gogio/help.go @@ -72,6 +72,7 @@ The -signkey flag specifies the path of the keystore, used for signing Android a or specifies the name of key on Keychain to sign MacOS app. The -signpass flag specifies the password of the keystore, ignored if -signkey is not provided. +If -signpass is not sepecified it will be read from the environment variable GOGIO_SIGNPASS. The -notaryid flag specifies the Apple ID to use for notarization of MacOS app.