Skip to content

Commit

Permalink
feat: add parameter to skip assets install after admin build
Browse files Browse the repository at this point in the history
  • Loading branch information
M-arcus authored and shyim committed Nov 29, 2023
1 parent de59f29 commit 76b31c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/project/project_admin_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
4 changes: 4 additions & 0 deletions wiki/docs/commands/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76b31c9

Please sign in to comment.