Skip to content

Commit

Permalink
Enforce at least 4 screenshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur2136 committed Apr 10, 2024
1 parent 1df8525 commit 062a56a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions example/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ release:
uri: ./media/app_screenshot1.png
- purpose: screenshot
uri: ./media/app_screenshot2.png
- purpose: screenshot
uri: ./media/app_screenshot3.png
- purpose: screenshot
uri: ./media/app_screenshot4.png
files:
- purpose: install
uri: ./files/app-debug.apk
Expand Down
File renamed without changes
Binary file added example/media/app_screenshot4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions packages/cli/src/config/PublishDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ export const loadPublishDetailsWithChecks = async (
}
);

const screenshots = config.release.media?.filter(
(asset: any) => asset.purpose === "screenshot"
)

if (screenshots.length < 4) {
throw new Error(`At least 4 screenshots are required for publishing a new release. Found only ${screenshots.length}`)
}

validateLocalizableResources(config);

const googlePkg = config.solana_mobile_dapp_publisher_portal.google_store_package;
Expand Down

0 comments on commit 062a56a

Please # to comment.