diff --git a/cmd/project/ci.go b/cmd/project/ci.go index 6c50fd04..3d24d8e5 100644 --- a/cmd/project/ci.go +++ b/cmd/project/ci.go @@ -303,7 +303,7 @@ func cleanupAdministrationFiles(ctx context.Context, folder string) error { logging.FromContext(ctx).Infof("Migrating generated snippet file for %s", folder) - snippetFolder := path.Join(adminFolder, "src", "snippet") + snippetFolder := path.Join(adminFolder, "src", "app", "snippet") if err := os.MkdirAll(snippetFolder, os.ModePerm); err != nil { return err } diff --git a/extension/bundle.go b/extension/bundle.go index 65912910..a3aef2b9 100644 --- a/extension/bundle.go +++ b/extension/bundle.go @@ -71,7 +71,7 @@ type shopwareBundleComposerJsonExtra struct { // GetRootDir returns the src directory of the bundle. func (p ShopwareBundle) GetRootDir() string { - return p.path + return path.Join(p.path, "src") } // GetResourcesDir returns the resources directory of the shopware bundle. diff --git a/extension/bundle_test.go b/extension/bundle_test.go index d725812a..4340afe3 100644 --- a/extension/bundle_test.go +++ b/extension/bundle_test.go @@ -72,9 +72,9 @@ func TestCreateBundle(t *testing.T) { assert.NoError(t, err) assert.Equal(t, "TestBundle", name) - assert.Equal(t, dir, bundle.GetRootDir()) + assert.Equal(t, path.Join(dir, "src"), bundle.GetRootDir()) assert.Equal(t, dir, bundle.GetPath()) - assert.Equal(t, path.Join(dir, "Resources"), bundle.GetResourcesDir()) + assert.Equal(t, path.Join(dir, "src", "Resources"), bundle.GetResourcesDir()) assert.Equal(t, TypeShopwareBundle, bundle.GetType()) _, err = bundle.GetChangelog() diff --git a/extension/project.go b/extension/project.go index 65254dd3..49d1aeb4 100644 --- a/extension/project.go +++ b/extension/project.go @@ -64,6 +64,8 @@ func FindAssetSourcesOfProject(ctx context.Context, project string) []asset.Sour name = filepath.Base(bundlePath) } + logging.FromContext(ctx).Infof("Found bundle in project: %s (path: %s)", name, bundlePath) + sources = append(sources, asset.Source{ Name: name, Path: path.Join(project, bundlePath),