Skip to content

Commit

Permalink
feat: add a tip to "foundation deploy" if the foundation has no platf…
Browse files Browse the repository at this point in the history
…orms
  • Loading branch information
JohannesRudolph committed Jul 7, 2023
1 parent b9934f2 commit dcbe339
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/commands/foundation/deploy.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function registerDeployCmd(program: TopLevelCommand) {
foundation,
validator,
);

await deployFoundation(collieRepo, foundationRepo, mode, opts, logger);

foundationProgress.done();
Expand All @@ -120,6 +121,14 @@ export async function deployFoundation(
// to debug any errors for an operator. If we later decide to do this, we should try and see if we can offload this
// challenge to tools that are already equipped to handle this in some sensible way (e.g. terragrunt with multiple --include-dir or gnu parallels etc.)

if (!platforms.length) {
logger.warn("Nothing to deploy, your foundation has no platforms yet");
logger.tipCommand(
"Add new platforms to your foundation by reinitializing it.\nThis will not overwrite existing configuration and platforms.",
"foundation new " + foundation.id,
);
Deno.exit(0);
}
for (const platform of platforms) {
const deployer = new PlatformDeployer(
platform,
Expand Down

0 comments on commit dcbe339

Please sign in to comment.