Skip to content

Commit 2d1c3b4

Browse files
committed
Prepare prerelease publishing and Debian version ordering
1 parent 6a96506 commit 2d1c3b4

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/cppcmake.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- '.github/workflows/cppcmake.yml'
1414
pull_request:
1515
release:
16-
types: ['created']
16+
types: ['published']
1717
workflow_dispatch:
1818
inputs:
1919
cmakeextra:

‎CMakeLists.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ elseif(WIN32)
5050
set(CPACK_GENERATOR ZIP)
5151
else()
5252
set(CPACK_GENERATOR DEB TGZ)
53+
# Debian prereleases must sort before the corresponding stable version.
54+
# Keep the Git tag and other package metadata unchanged (e.g. 1.18.0.b3).
55+
string(REGEX REPLACE
56+
"^([0-9]+\\.[0-9]+\\.[0-9]+)[.-]?((alpha|beta|rc|a|b)[0-9]+)$"
57+
"\\1~\\2" CPACK_DEBIAN_PACKAGE_VERSION "${LSL_VERSION_FULL}")
5358
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "LabStreamingLayer Developers")
5459
set(CPACK_DEBIAN_PACKAGE_SECTION "science")
5560
if(LSL_ARCH STREQUAL "amd64" OR LSL_ARCH STREQUAL "arm64" OR LSL_ARCH STREQUAL "i386")

0 commit comments

Comments
 (0)