Merge pull request #9973 from id/feat-release-windows-binaries-as-zip

feat: release windows binaries as zip
This commit is contained in:
Ivan Dyachkov 2023-02-21 09:43:22 +00:00 committed by GitHub
commit 94420b44f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

10
build
View File

@ -233,6 +233,9 @@ make_tgz() {
macos*) macos*)
target_name="${PROFILE}-${full_vsn}.zip" target_name="${PROFILE}-${full_vsn}.zip"
;; ;;
windows*)
target_name="${PROFILE}-${full_vsn}.zip"
;;
*) *)
target_name="${PROFILE}-${full_vsn}.tar.gz" target_name="${PROFILE}-${full_vsn}.tar.gz"
;; ;;
@ -298,6 +301,13 @@ make_tgz() {
# sha256sum may not be available on macos # sha256sum may not be available on macos
openssl dgst -sha256 "${target}" | cut -d ' ' -f 2 > "${target}.sha256" openssl dgst -sha256 "${target}" | cut -d ' ' -f 2 > "${target}.sha256"
;; ;;
windows*)
pushd "${tard}" >/dev/null
7z a "${target_name}" ./emqx/* >/dev/null
popd >/dev/null
mv "${tard}/${target_name}" "${target}"
sha256sum "${target}" | head -c 64 > "${target}.sha256"
;;
*) *)
## create tar after change dir ## create tar after change dir
## to avoid creating an extra level of 'emqx' dir in the .tar.gz file ## to avoid creating an extra level of 'emqx' dir in the .tar.gz file