Bug fix - nuget bp
@@ -50,16 +50,20 @@ func (solution *solution) BuildInfo(module string) (*buildinfo.BuildInfo, error)
for _, dep := range dependencies {
projectDependencies = append(projectDependencies, *dep)
}
- if module == "" {
- module = project.Name()
- }
- module := buildinfo.Module{Id: module, Dependencies: projectDependencies}
+ module := buildinfo.Module{Id: getModuleId(module, project.Name()), Dependencies: projectDependencies}
modules = append(modules, module)
}
buildInfo.Modules = modules
return buildInfo, nil
}
+func getModuleId(customModuleID, projectName string) string {
+ if customModuleID != "" {
+ return customModuleID
+ }
+ return projectName
+}
+
func (solution *solution) Marshal() ([]byte, error) {
return json.Marshal(&struct {
Projects []project.Project `json:"projects,omitempty"`
