Skip to content

Commit 1c9f0f3

Browse files
committed
Use proper value for GOPRIVATE in sync-tags
On-behalf-of: @SAP [email protected] Signed-off-by: Marko Mudrinić <[email protected]>
1 parent 67c8340 commit 1c9f0f3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmd/sync-tags/gomod.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ func updateGomodWithTaggedDependencies(searchTag string, depsRepo []string, semv
4343
return changed, err
4444
}
4545

46-
fmt.Println("Found the following dependencies to update:", depPackages)
47-
4846
for _, dep := range depsRepo {
4947
depPath := filepath.Join("..", dep)
5048
dr, err := gogit.PlainOpen(depPath)
@@ -185,14 +183,18 @@ func updateGomodWithTaggedDependencies(searchTag string, depsRepo []string, semv
185183
}
186184

187185
// depImportPaths returns a comma separated string with each dependencies' import path.
188-
// Eg. "k8s.io/api,k8s.io/apimachinery,k8s.io/client-go".
186+
// Eg. "github.com/kcp-dev/apimachinery,github.com/kcp-dev/client-go".
189187
func depsImportPaths(depsRepo []string) (string, error) {
190188
dir, err := os.Getwd()
191189
if err != nil {
192190
return "", fmt.Errorf("unable to get current working directory: %w", err)
193191
}
194192
d := strings.Split(dir, "/")
195193
basePackage := d[len(d)-2]
194+
server := d[len(d)-3]
195+
if server != "src" {
196+
basePackage = fmt.Sprintf("%s/%s", server, basePackage)
197+
}
196198

197199
depImportPathList := []string{}
198200
for _, dep := range depsRepo {

0 commit comments

Comments
 (0)