You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnil, fmt.Errorf("parse properties for bundle %q: %v", b.Name, err)
134
134
}
135
135
136
-
iflen(props.Packages) !=1 {
137
-
returnnil, fmt.Errorf("package %q bundle %q must have exactly 1 %q property, found %d", b.Package, b.Name, property.TypePackage, len(props.Packages))
138
-
}
139
-
140
-
ifb.Package!=props.Packages[0].PackageName {
141
-
returnnil, fmt.Errorf("package %q does not match %q property %q", b.Package, property.TypePackage, props.Packages[0].PackageName)
136
+
varrawVersionstring
137
+
ifb.Version!=nil {
138
+
rawVersion=b.Version.String()
139
+
} elseiflen(props.Packages) ==1 {
140
+
ifb.Package!=props.Packages[0].PackageName {
141
+
returnnil, fmt.Errorf("package %q does not match %q property %q", b.Package, property.TypePackage, props.Packages[0].PackageName)
142
+
}
143
+
rawVersion=props.Packages[0].Version
144
+
} else {
145
+
returnnil, fmt.Errorf("package %q bundle %q requires either version being set or exactly one property with type %q", b.Package, b.Name, property.TypePackage)
0 commit comments