release: bump to 1.0.6 and show build id in About dialog

Make Flatpak updates unmistakable after clients were stuck on the
May 1.0.3 commit. Expose bearwaveVersion/bearwaveBuildId to QML and
set the flatpak manifest version explicitly.
This commit is contained in:
Sebastian Palencsar
2026-06-22 16:43:49 +02:00
parent a8815cd4e3
commit 75ef65e1d8
6 changed files with 27 additions and 2 deletions

View File

@@ -18,8 +18,20 @@ set(SOURCES
# Create executable
add_executable(bearwave ${SOURCES})
execute_process(
COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..
OUTPUT_VARIABLE BEARWAVE_GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
if(NOT BEARWAVE_GIT_HASH)
set(BEARWAVE_GIT_HASH "unknown")
endif()
target_compile_definitions(bearwave PRIVATE
BEARWAVE_VERSION="${PROJECT_VERSION}"
BEARWAVE_GIT_HASH="${BEARWAVE_GIT_HASH}"
)
# Qt Resources

View File

@@ -53,6 +53,8 @@ int main(int argc, char *argv[])
RadioBackend backend;
engine.rootContext()->setContextProperty("radioBackend", &backend);
engine.rootContext()->setContextProperty("bearwaveVersion", QStringLiteral(BEARWAVE_VERSION));
engine.rootContext()->setContextProperty("bearwaveBuildId", QStringLiteral(BEARWAVE_GIT_HASH));
auto *mprisRoot = new MprisRootAdaptor(&backend, &app);
auto *mprisPlayer = new MprisPlayerAdaptor(&backend);

View File

@@ -53,7 +53,9 @@ Dialog {
Label {
Layout.alignment: Qt.AlignHCenter
text: qsTr("Version: %1").arg(Qt.application.version)
text: qsTr("Version: %1 (%2)").arg(
(typeof bearwaveVersion !== "undefined" ? bearwaveVersion : Qt.application.version),
(typeof bearwaveBuildId !== "undefined" ? bearwaveBuildId : "?"))
color: BearTheme.textMuted
font.pixelSize: 12
}