Skip to content

Commit

Permalink
release: Fix create app store version
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Dec 21, 2024
1 parent 3c00099 commit 27bdef3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/internal/app_store_connect/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
Expand All @@ -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
}
}
}
Expand Down

0 comments on commit 27bdef3

Please sign in to comment.