mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 17:05:38 +00:00
cmd/gio: change all occurences of *appID with the buildInfo field
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -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) {
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>`, *appID, bi.version, bi.version, iconSnip, appName, appName)
|
||||
</manifest>`, 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
|
||||
|
||||
+5
-5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user