Skip to content

Commit 4ae9f53

Browse files
authored
Merge pull request #5439 from charles-chenzz/windows_release_binary_name
add back the missing suffix in kustomize v5.x.x in windows version
2 parents 265195c + ec3be81 commit 4ae9f53

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

releasing/create-release.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,20 @@ function build_kustomize_binary {
5252
for arch in "${arch_list[@]}" ; do
5353
echo "Building $os-$arch"
5454
# 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\
5658
"-s -w\
5759
-X sigs.k8s.io/kustomize/api/provenance.version=$version\
5860
-X sigs.k8s.io/kustomize/api/provenance.gitCommit=$(git rev-parse HEAD)\
5961
-X sigs.k8s.io/kustomize/api/provenance.buildDate=$build_date"\
6062
kustomize/main.go
6163
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
6365
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
6567
fi
66-
rm output/kustomize
68+
rm output/$binary_name
6769
done
6870
done
6971

0 commit comments

Comments
 (0)