From fe1c82ea4b6bdcb1d1ddc3a8cc1a885834ec6f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20M=C3=BCller?= <25648755+M-arcus@users.noreply.github.com> Date: Mon, 6 Nov 2023 12:46:52 +0100 Subject: [PATCH] feat: add parameter to skip theme compilation after storefront build --- cmd/project/project_storefront_build.go | 6 ++++++ wiki/docs/commands/project.md | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/cmd/project/project_storefront_build.go b/cmd/project/project_storefront_build.go index 8c794c4b..795f810d 100644 --- a/cmd/project/project_storefront_build.go +++ b/cmd/project/project_storefront_build.go @@ -39,10 +39,16 @@ var projectStorefrontBuildCmd = &cobra.Command{ return err } + skipThemeCompile, _ := cmd.PersistentFlags().GetBool("skip-theme-compile") + if skipThemeCompile { + return nil + } + return runTransparentCommand(commandWithRoot(exec.CommandContext(cmd.Context(), "php", "bin/console", "theme:compile"), projectRoot)) }, } func init() { projectRootCmd.AddCommand(projectStorefrontBuildCmd) + projectStorefrontBuildCmd.PersistentFlags().Bool("skip-theme-compile", false, "Skip theme compilation") } diff --git a/wiki/docs/commands/project.md b/wiki/docs/commands/project.md index 2758e532..ff761690 100644 --- a/wiki/docs/commands/project.md +++ b/wiki/docs/commands/project.md @@ -20,6 +20,10 @@ Builds the Administration with all installed extensions Builds the Storefront with all installed extensions +Parameters: + +* `skip-theme-compile` - Skips the theme compilation + ## shopware-cli project worker Starts the Shopware worker in background and tails the log