@@ -14,6 +14,7 @@ import (
14
14
"github.com/intelops/compage/internal/languages/golang/integrations/docker"
15
15
"github.com/intelops/compage/internal/languages/golang/integrations/githubactions"
16
16
"github.com/intelops/compage/internal/languages/golang/integrations/kubernetes"
17
+ "github.com/intelops/compage/internal/languages/golang/integrations/license"
17
18
"github.com/intelops/compage/internal/languages/templates"
18
19
"github.com/intelops/compage/internal/utils"
19
20
log "github.com/sirupsen/logrus"
@@ -68,6 +69,14 @@ func generateIntegrationConfig(goValues *GoValues) error {
68
69
log .Errorf ("error while getting the integrations copier [" + err .Error () + "]" )
69
70
return err
70
71
}
72
+
73
+ // license files need to be generated for the whole project so, it should be here.
74
+ licenseCopier := m ["license" ].(* license.Copier )
75
+ if err = licenseCopier .CreateLicenseFiles (); err != nil {
76
+ log .Errorf ("err : %s" , err )
77
+ return err
78
+ }
79
+
71
80
// dockerfile needs to be generated for the whole project, so it should be here.
72
81
dockerCopier := m ["docker" ].(* docker.Copier )
73
82
if err = dockerCopier .CreateDockerFile (); err != nil {
@@ -389,6 +398,9 @@ func getIntegrationsCopier(goValues *GoValues) (map[string]interface{}, error) {
389
398
projectDirectoryName := utils .GetProjectDirectoryName (goValues .Values .ProjectName )
390
399
projectName := goValues .Values .ProjectName
391
400
401
+ // create dotnet specific licenseCopier
402
+ licenseCopier := license .NewCopier (gitPlatformUserName , gitRepositoryName , nodeName , nodeDirectoryName , goTemplatesRootPath , goValues .LGoLangNode .License )
403
+
392
404
// create golang specific dockerCopier
393
405
dockerCopier := docker .NewCopier (gitPlatformUserName , gitRepositoryName , nodeName , nodeDirectoryName , goTemplatesRootPath , isRestServer , restServerPort , isGrpcServer , grpcServerPort )
394
406
@@ -405,6 +417,7 @@ func getIntegrationsCopier(goValues *GoValues) (map[string]interface{}, error) {
405
417
devContainerCopier := devcontainer .NewCopier (gitPlatformUserName , gitRepositoryName , projectName , nodeName , nodeDirectoryName , goTemplatesRootPath , isRestServer , restServerPort , isGrpcServer , grpcServerPort )
406
418
407
419
return map [string ]interface {}{
420
+ "license" : licenseCopier ,
408
421
"docker" : dockerCopier ,
409
422
"k8s" : k8sCopier ,
410
423
"githubActions" : githubActionsCopier ,
0 commit comments