mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 22:24:17 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user