diff --git a/cmd/project/ci.go b/cmd/project/ci.go index 2fce0346..05e06bfd 100644 --- a/cmd/project/ci.go +++ b/cmd/project/ci.go @@ -79,9 +79,11 @@ var projectCI = &cobra.Command{ return err } - for _, ext := range extensions { - if err := cleanupAdministrationFiles(cmd.Context(), ext.GetRootDir()); err != nil { - return err + if !shopCfg.Build.KeepExtensionSource { + for _, ext := range extensions { + if err := cleanupAdministrationFiles(cmd.Context(), ext.GetRootDir()); err != nil { + return err + } } } diff --git a/shop/config.go b/shop/config.go index a14e5e6a..bb9ce011 100644 --- a/shop/config.go +++ b/shop/config.go @@ -22,6 +22,7 @@ type Config struct { type ConfigBuild struct { DisableAssetCopy bool `yaml:"disable_asset_copy,omitempty"` RemoveExtensionAssets bool `yaml:"remove_extension_assets,omitempty"` + KeepExtensionSource bool `yaml:"keep_extension_source,omitempty"` CleanupPaths []string `yaml:"cleanup_paths,omitempty"` } diff --git a/wiki/docs/shopware-project-yml-schema.md b/wiki/docs/shopware-project-yml-schema.md index 4b1d7d99..0d76fe20 100644 --- a/wiki/docs/shopware-project-yml-schema.md +++ b/wiki/docs/shopware-project-yml-schema.md @@ -26,6 +26,9 @@ build: remove_extension_assets: false # skips the bin/console asset:install part disable_asset_copy: false + # when enabled src/Resources/app/{storefront/administration} folder will be preserved and not deleted. + # If your plugin requires, you should move the files out of src/Resources which needs to be accessed by php and js + keep_extension_source: false # delete additional paths after build cleanup_paths: - path