From 76b31c91b9be9831dbfb8683687de2197d5ff361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20M=C3=BCller?= <25648755+M-arcus@users.noreply.github.com> Date: Wed, 29 Nov 2023 18:50:24 +0100 Subject: [PATCH] feat: add parameter to skip assets install after admin build --- cmd/project/project_admin_build.go | 6 ++++++ wiki/docs/commands/project.md | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/cmd/project/project_admin_build.go b/cmd/project/project_admin_build.go index a0e0379e..f398a438 100644 --- a/cmd/project/project_admin_build.go +++ b/cmd/project/project_admin_build.go @@ -39,10 +39,16 @@ var projectAdminBuildCmd = &cobra.Command{ return err } + skipAssetsInstall, _ := cmd.PersistentFlags().GetBool("skip-assets-install") + if skipAssetsInstall { + return nil + } + return runTransparentCommand(commandWithRoot(exec.CommandContext(cmd.Context(), "php", "bin/console", "assets:install"), projectRoot)) }, } func init() { projectRootCmd.AddCommand(projectAdminBuildCmd) + projectAdminBuildCmd.PersistentFlags().Bool("skip-assets-install", false, "Skips the assets installation") } diff --git a/wiki/docs/commands/project.md b/wiki/docs/commands/project.md index 1d8fc300..9f2282c1 100644 --- a/wiki/docs/commands/project.md +++ b/wiki/docs/commands/project.md @@ -16,6 +16,10 @@ Arguments: Builds the Administration with all installed extensions +Parameters: + +* `--skip-assets-install` - Skips the assets installation + ## shopware-cli project storefront-build Builds the Storefront with all installed extensions