Skip to content

Commit

Permalink
Update for windows binary packaging
Browse files Browse the repository at this point in the history
- Updated steps for release preparation
- Changed destination for binary archives

(Closes #798)
  • Loading branch information
Nightwalker-87 committed May 9, 2020
1 parent 5e0e299 commit 7bb34fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 1 addition & 2 deletions cmake/packaging/cpack_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 2 additions & 0 deletions cmake/packaging/windows/generate_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
13 changes: 7 additions & 6 deletions doc/release.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7bb34fc

Please sign in to comment.