From 72c2cf5a2f07e8db4e0f5c75f90ab84012d0406d Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Mon, 28 Oct 2024 21:25:43 +0100 Subject: [PATCH] feat: pre- and postdeploy --- src/commands/deploy.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index 12c73fb..ea910bf 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -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, + preDeploy as cliPreDeploy, + hasArgs +} from '@junobuild/cli-tools'; import {uploadBlob, type Asset} from '@junobuild/core-peer'; import {red} from 'kleur'; import {lstatSync} from 'node:fs'; @@ -64,6 +69,8 @@ const executeDeploy = async (args?: string[]) => { }); }; + await cliPreDeploy({config: satelliteConfig}); + await cliDeploy({ config: satelliteConfig, listAssets: listExistingAssets, @@ -71,6 +78,8 @@ const executeDeploy = async (args?: string[]) => { assertMemory, uploadFile }); + + await cliPostDeploy({config: satelliteConfig}); }; const assertSourceDirExists = (source: string) => {