From 27bdef34c7bf2753e339047b92528bbe9b69a4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 21 Dec 2024 17:11:09 +0800 Subject: [PATCH] release: Fix create app store version --- cmd/internal/app_store_connect/main.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/internal/app_store_connect/main.go b/cmd/internal/app_store_connect/main.go index 1fe34742..ef006738 100644 --- a/cmd/internal/app_store_connect/main.go +++ b/cmd/internal/app_store_connect/main.go @@ -359,7 +359,7 @@ func prepareAppStore(ctx context.Context) error { if localization.ID == "" { log.Info(string(platform), " ", tag, " no en-US localization found") } - if localization.Attributes.WhatsNew == nil && *localization.Attributes.WhatsNew == "" { + if localization.Attributes == nil || localization.Attributes.WhatsNew == nil || *localization.Attributes.WhatsNew == "" { log.Info(string(platform), " ", tag, " update localization") _, _, err = client.Apps.UpdateAppStoreVersionLocalization(ctx, localization.ID, &asc.AppStoreVersionLocalizationUpdateRequestAttributes{ PromotionalText: common.Ptr("Yet another distribution for sing-box, the universal proxy platform."), @@ -378,16 +378,14 @@ func prepareAppStore(ctx context.Context) error { case http.StatusInternalServerError: continue default: - response.Write(os.Stderr) - log.Info(string(platform), " ", tag, " unexpected response: ", response.Status) + return err } } switch response.StatusCode { case http.StatusCreated: break fixSubmit default: - response.Write(os.Stderr) - log.Info(string(platform), " ", tag, " unexpected response: ", response.Status) + return err } } }