Skip to content

Commit b024fe4

Browse files
committed
fix: windows releases
1 parent d5efdab commit b024fe4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/scaffold/project/project.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"fmt"
2121
"go/build"
2222
"os"
23+
"path"
2324
"path/filepath"
2425
"strings"
2526

@@ -96,7 +97,7 @@ func (Project) RepoFromGopathAndWd(gopath string, getwd func() (string, error))
9697
// '$GOPATH/src/kubernetes-sigs/controller-tools' becomes 'kubernetes-sigs/controller-tools'
9798
repo := ""
9899
for wd != goSrc {
99-
repo = filepath.Join(filepath.Base(wd), repo)
100+
repo = path.Join(filepath.Base(wd), repo)
100101
wd = filepath.Dir(wd)
101102
}
102103
return repo, nil

pkg/scaffold/v1/manager/apis.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (a *APIs) GetInput() (input.Input, error) {
5252
}
5353
if len(a.Comments) == 0 {
5454
a.Comments = append(a.Comments,
55-
"// Generate deepcopy for apis", fmt.Sprintf("%s -h %s", deepCopy, b))
55+
"// Generate deepcopy for apis", fmt.Sprintf("%s -h %s", deepCopy, filepath.ToSlash(b)))
5656
}
5757
a.TemplateBody = apisTemplate
5858
return a.Input, nil

0 commit comments

Comments
 (0)