Skip to content

Commit

Permalink
Add alpha release warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur2136 committed Jul 26, 2024
1 parent cc09f0f commit 9be029c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 1 addition & 3 deletions example/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,4 @@ solana_mobile_dapp_publisher_portal:
- address: 3tgkMfug2gs82sy2wexQjMkR12JzFcX9rSLd9yM9m38g
comment: Employe#1 genesis token
- address: G65S4B3RkFpPAt9CwY4cZXptNSkTS6c8hFW1m89GCuB1
comment: Employe#2 genesis token
lastUpdatedVersionOnStore:
address: DQTYHFQs2ivTRzWEXmoyGtYd8y12uFicDqDjbrPpE78Q
comment: Employe#2 genesis token
9 changes: 9 additions & 0 deletions packages/cli/src/CliSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
checkForSelfUpdate,
checkSubmissionNetwork,
Constants,
alphaAppSubmissionMessage,
dryRunSuccessMessage,
generateNetworkSuffix,
parseKeypair,
Expand Down Expand Up @@ -325,6 +326,10 @@ publishCommand
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.")
}

if (alpha) {
alphaAppSubmissionMessage()
}

const signer = parseKeypair(keypair);
if (signer) {
if (config.lastUpdatedVersionOnStore != null && config.lastSubmittedVersionOnChain.address != null) {
Expand Down Expand Up @@ -416,6 +421,10 @@ publishCommand
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.")
}

if (alpha) {
alphaAppSubmissionMessage()
}

const signer = parseKeypair(keypair);
if (signer) {
await publishUpdateCommand({
Expand Down
9 changes: 9 additions & 0 deletions packages/cli/src/CliUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ export const dryRunSuccessMessage = () => {
showMessage("Dry run", "Dry run was successful", "standard")
}

export const alphaAppSubmissionMessage = () => {
showMessage(
"Alpha release",
"Apps are not auto-reviewed on alpha track and are meant for internal testing only.\n" +
"Reach out to the mobile team contact to upgrade your alpha app to release.",
"warning"
)
}

export const showNetworkWarningIfApplicable = (rpcUrl: string) => {
if (isDevnet(rpcUrl)) {
showMessage("Devnet Mode", "Running on Devnet", "warning")
Expand Down

0 comments on commit 9be029c

Please sign in to comment.