From 6433cb2d883ac3011a5fb483fe59911b51f692ee Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 24 Aug 2019 17:44:14 +0100 Subject: [PATCH] cmd/gio: change all occurences of *appID with the buildInfo field Signed-off-by: Elias Naur --- cmd/gio/androidbuild.go | 4 ++-- cmd/gio/iosbuild.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/gio/androidbuild.go b/cmd/gio/androidbuild.go index c66a99d9..6420b27b 100644 --- a/cmd/gio/androidbuild.go +++ b/cmd/gio/androidbuild.go @@ -200,7 +200,7 @@ func archiveAndroid(tmpDir string, bi *buildInfo) (err error) { } func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo) (err error) { - if *appID == "" { + if bi.appID == "" { return errors.New("app id is empty; use -appid to set it") } classes := filepath.Join(tmpDir, "classes") @@ -310,7 +310,7 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo) (err error) { -`, *appID, bi.version, bi.version, iconSnip, appName, appName) +`, bi.appID, bi.version, bi.version, iconSnip, appName, appName) manifest := filepath.Join(tmpDir, "AndroidManifest.xml") if err := ioutil.WriteFile(manifest, []byte(manifestSrc), 0660); err != nil { return err diff --git a/cmd/gio/iosbuild.go b/cmd/gio/iosbuild.go index 2e37557d..f7785879 100644 --- a/cmd/gio/iosbuild.go +++ b/cmd/gio/iosbuild.go @@ -68,7 +68,7 @@ func buildIOS(tmpDir, target string, bi *buildInfo) error { if err := exeIOS(tmpDir, target, appDir, bi); err != nil { return err } - if err := signIOS(tmpDir, appDir, out); err != nil { + if err := signIOS(bi, tmpDir, appDir, out); err != nil { return err } return zipDir(out, tmpDir, "Payload") @@ -77,7 +77,7 @@ func buildIOS(tmpDir, target string, bi *buildInfo) error { } } -func signIOS(tmpDir, app, ipa string) error { +func signIOS(bi *buildInfo, tmpDir, app, ipa string) error { home, err := os.UserHomeDir() if err != nil { return err @@ -114,7 +114,7 @@ func signIOS(tmpDir, app, ipa string) error { if err != nil { return err } - expAppID := fmt.Sprintf("%s.%s", appIDPrefix, *appID) + expAppID := fmt.Sprintf("%s.%s", appIDPrefix, bi.appID) avail = append(avail, provAppID) if expAppID != provAppID { continue @@ -146,11 +146,11 @@ func signIOS(tmpDir, app, ipa string) error { _, err = runCmd(exec.Command("codesign", "-s", signIdentity, "--entitlements", entFile, app)) return err } - return fmt.Errorf("sign: no valid provisioning profile found for bundle id %q among %v", *appID, avail) + return fmt.Errorf("sign: no valid provisioning profile found for bundle id %q among %v", bi.appID, avail) } func exeIOS(tmpDir, target, app string, bi *buildInfo) error { - if *appID == "" { + if bi.appID == "" { return errors.New("app id is empty; use -appid to set it") } if err := os.RemoveAll(app); err != nil {