File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -52,18 +52,20 @@ function build_kustomize_binary {
52
52
for arch in " ${arch_list[@]} " ; do
53
53
echo " Building $os -$arch "
54
54
# CGO_ENABLED=0 GOWORK=off GOOS=$os GOARCH=$arch go build -o output/kustomize -ldflags\
55
- CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build -o output/kustomize -ldflags\
55
+ binary_name=" kustomize"
56
+ [[ " $os " == " windows" ]] && binary_name=" kustomize.exe"
57
+ CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build -o output/$binary_name -ldflags\
56
58
" -s -w\
57
59
-X sigs.k8s.io/kustomize/api/provenance.version=$version \
58
60
-X sigs.k8s.io/kustomize/api/provenance.gitCommit=$( git rev-parse HEAD) \
59
61
-X sigs.k8s.io/kustomize/api/provenance.buildDate=$build_date " \
60
62
kustomize/main.go
61
63
if [ " $os " == " windows" ]; then
62
- zip -j " ${release_dir} /kustomize_${version} _${os} _${arch} .zip" output/kustomize
64
+ zip -j " ${release_dir} /kustomize_${version} _${os} _${arch} .zip" output/$binary_name
63
65
else
64
- tar cvfz " ${release_dir} /kustomize_${version} _${os} _${arch} .tar.gz" -C output kustomize
66
+ tar cvfz " ${release_dir} /kustomize_${version} _${os} _${arch} .tar.gz" -C output $binary_name
65
67
fi
66
- rm output/kustomize
68
+ rm output/$binary_name
67
69
done
68
70
done
69
71
You can’t perform that action at this time.
0 commit comments