From 7bb34fcfb2a19c03c7daa2986aad4515f699f24b Mon Sep 17 00:00:00 2001 From: nightwalker-87 <15526941+Nightwalker-87@users.noreply.github.com> Date: Sun, 10 May 2020 00:47:37 +0200 Subject: [PATCH] Update for windows binary packaging - Updated steps for release preparation - Changed destination for binary archives (Closes #798) --- cmake/packaging/cpack_config.cmake | 3 +-- cmake/packaging/windows/generate_binaries.sh | 2 ++ doc/release.md | 13 +++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cmake/packaging/cpack_config.cmake b/cmake/packaging/cpack_config.cmake index c813628..a0fddd7 100644 --- a/cmake/packaging/cpack_config.cmake +++ b/cmake/packaging/cpack_config.cmake @@ -25,12 +25,11 @@ elseif (WIN32 AND NOT EXISTS "/etc/debian_version") set(CPACK_INSTALL_PREFIX "") elseif (WIN32) # Windows cross-build on Debian/Ubuntu - set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_SOURCE_DIR}/build/Release/dist") set(CPACK_GENERATOR "ZIP") set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-${TOOLCHAIN_PREFIX}") set(CPACK_INSTALL_PREFIX "") -elseif (EXISTS "/etc/debian_version") # Package-build is available on Debian/Ubuntu only +elseif (EXISTS "/etc/debian_version" AND NOT EXISTS WIN32) # Package-build is available on Debian/Ubuntu only message(STATUS "Debian-based Linux OS detected") set(CPACK_GENERATOR "DEB;RPM") # RPM requires package `rpm` diff --git a/cmake/packaging/windows/generate_binaries.sh b/cmake/packaging/windows/generate_binaries.sh index ba5b965..d38f8d6 100644 --- a/cmake/packaging/windows/generate_binaries.sh +++ b/cmake/packaging/windows/generate_binaries.sh @@ -12,6 +12,7 @@ cmake -DCMAKE_SYSTEM_NAME=Windows \ -DTOOLCHAIN_PREFIX=x86_64-w64-mingw32 \ -DCMAKE_TOOLCHAIN_FILE=./cmake/modules/set_toolchain.cmake .. make package +cp dist/*.zip ../build/Release/dist cd .. rm -rf build-mingw @@ -22,5 +23,6 @@ cmake -DCMAKE_SYSTEM_NAME=Windows \ -DTOOLCHAIN_PREFIX=i686-w64-mingw32 \ -DCMAKE_TOOLCHAIN_FILE=./cmake/modules/set_toolchain.cmake .. make package +cp dist/*.zip ../build/Release/dist cd .. rm -rf build-mingw diff --git a/doc/release.md b/doc/release.md index ae8b864..4b536d9 100644 --- a/doc/release.md +++ b/doc/release.md @@ -1,10 +1,11 @@ Release ======= -This document describes the steps it takes for developers to create a release +This document describes the necessary steps for developers to create a release: -1. Update `.version` with semantic version: `x.x.x` -2. Update `README.md` with semantic version `x.x.x` in commits badge -2. Create and push git tag and commits `git tag x.x.x` -3. Create source tarball/zipfile with `make dist` -4. Create binary package with `make package` +1. Update `CHANGELOG.md` and `cmake/packaging/deb/changelog` +2. Update `.version` with semantic version: `x.x.x` +3. Update `README.md` with semantic version `x.x.x` in commits badge +4. Create and push git tag and commits `git tag x.x.x` +5. Create binary packages (.rpm / .deb / .zip) with `make package && sh ./cmake/packaging/windows/generate_binaries.sh` +6. Upload packages to the [release page](https://github.com/stlink-org/stlink/releases) of this project