Skip to content

Commit

Permalink
feat: pre- and postdeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Oct 28, 2024
1 parent 880b876 commit 72c2cf5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/commands/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type {UploadFileStorage} from '@junobuild/cli-tools';
import {deploy as cliDeploy, hasArgs} from '@junobuild/cli-tools';
import {
deploy as cliDeploy,
postDeploy as cliPostDeploy,

Check failure on line 4 in src/commands/deploy.ts

View workflow job for this annotation

GitHub Actions / build

Module '"@junobuild/cli-tools"' has no exported member 'postDeploy'.
preDeploy as cliPreDeploy,

Check failure on line 5 in src/commands/deploy.ts

View workflow job for this annotation

GitHub Actions / build

'"@junobuild/cli-tools"' has no exported member named 'preDeploy'. Did you mean 'deploy'?
hasArgs
} from '@junobuild/cli-tools';
import {uploadBlob, type Asset} from '@junobuild/core-peer';
import {red} from 'kleur';
import {lstatSync} from 'node:fs';
Expand Down Expand Up @@ -64,13 +69,17 @@ const executeDeploy = async (args?: string[]) => {
});
};

await cliPreDeploy({config: satelliteConfig});

await cliDeploy({
config: satelliteConfig,
listAssets: listExistingAssets,
assertSourceDirExists,
assertMemory,
uploadFile
});

await cliPostDeploy({config: satelliteConfig});
};

const assertSourceDirExists = (source: string) => {
Expand Down

0 comments on commit 72c2cf5

Please sign in to comment.