diff --git a/src/commands/auto-reload.ts b/src/commands/auto-reload.ts index 210176089d..77ef3fdacb 100644 --- a/src/commands/auto-reload.ts +++ b/src/commands/auto-reload.ts @@ -48,7 +48,6 @@ export class AutoReloadCommand extends Command { }) registerCleanupFunction("clearAutoReloadWatches", () => { - ctx.log.info({ msg: "Clearing autoreload watches" }) watcher.end() }) diff --git a/src/commands/build.ts b/src/commands/build.ts index 8a5d10ad63..6525854d3f 100644 --- a/src/commands/build.ts +++ b/src/commands/build.ts @@ -41,8 +41,13 @@ export class BuildCommand extends Command { + const result = await ctx.processModules(modules, opts.watch, async (module) => { await ctx.addTask(new BuildTask(ctx, module, opts.force)) }) + + ctx.log.info("") + ctx.log.header({ emoji: "heavy_check_mark", command: `Done!` }) + + return result } } diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index bb8967f7ff..fed50f9cca 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -44,6 +44,8 @@ export class DeployCommand extends Command return {} } + ctx.log.header({ emoji: "rocket", command: "Deploy" }) + // TODO: make this a task await ctx.configureEnvironment() @@ -51,15 +53,18 @@ export class DeployCommand extends Command const force = opts.force const forceBuild = opts["force-build"] - ctx.log.header({ emoji: "rocket", command: "Deploy" }) - const modules = Array.from(new Set(values(services).map(s => s.module))) - return ctx.processModules(modules, watch, async (module) => { + const result = ctx.processModules(modules, watch, async (module) => { const servicesToDeploy = values(await module.getServices()).filter(s => !!services[s.name]) for (const service of servicesToDeploy) { await ctx.addTask(new DeployTask(ctx, service, force, forceBuild)) } }) + + ctx.log.info("") + ctx.log.header({ emoji: "heavy_check_mark", command: `Done!` }) + + return result } } diff --git a/src/plugin-context.ts b/src/plugin-context.ts index 22730e57aa..591f3c554e 100644 --- a/src/plugin-context.ts +++ b/src/plugin-context.ts @@ -396,14 +396,14 @@ export function createPluginContext(garden: Garden): PluginContext { // TODO: should the prefix here be different or set explicitly per run? await watcher.watchModules(modules, "addTasksForAutoReload/", async (changedModule) => { - ctx.log.info({ msg: `files changed for module ${changedModule.name}` }) + ctx.log.debug({ msg: `Files changed for module ${changedModule.name}` }) await handleChanges(changedModule) logErrors(await ctx.processTasks()) }) registerCleanupFunction("clearAutoReloadWatches", () => { - ctx.log.info({ msg: "Clearing autoreload watches" }) watcher.end() + ctx.log.info({ msg: "\nDone!" }) }) while (true) { diff --git a/src/watch.ts b/src/watch.ts index 705348525d..ce6b8f0e1a 100644 --- a/src/watch.ts +++ b/src/watch.ts @@ -40,7 +40,7 @@ export async function watchModules( const watcher = new FSWatcher(ctx.projectRoot) await watcher.watchModules(modules, "addTasksForAutoReload/", async (changedModule) => { - ctx.log.info({ msg: `files changed for module ${changedModule.name}` }) + ctx.log.debug({ msg: `Files changed for module ${changedModule.name}` }) await handleChanges(changedModule) await ctx.processTasks() })