From 00599908c8915a34087c7efbb3aef554f29a24f4 Mon Sep 17 00:00:00 2001
From: Burak Hancerli <burak.hancerli@qt.io>
Date: Wed, 11 Dec 2024 10:31:36 +0100
Subject: [PATCH] cicd: can't set the google play store version properly

---
 CMakeLists.txt     | 6 ++++++
 src/CMakeLists.txt | 2 --
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b3ed7c..ffdee5d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,12 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/zxing-cpp)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tests)
 
+# this needs to be increased with every new release
+if(NOT DEFINED GOOGLE_PLAY_APP_VERSION)
+    set(GOOGLE_PLAY_APP_VERSION 31)
+endif()
+
+message(STATUS "GOOGLE_PLAY_APP_VERSION: ${GOOGLE_PLAY_APP_VERSION}")
 message(STATUS "PROJECT VERSION: ${CMAKE_VAR_GIT_VERSION}")
 message(STATUS "QT_VERSION: ${QT_VERSION}")
 message(STATUS "QT_QUICK_COMPONENTS_VERSION: ${CMAKE_VAR_QT_QUICK_COMPONENTS_VERSION}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cf9b341..c140b57 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -86,7 +86,5 @@ set_property(TARGET ${PROJECT_NAME}
         ${ANDROID_OPENSSL_PATH}/libssl_3.so
 )
 
-# this needs to be increased with every new release
-set(GOOGLE_PLAY_APP_VERSION 31)
 # CMAKE_VAR_GIT_VERSION (coming from the top-level CMakeLists.txt) and GOOGLE_PLAY_APP_VERSION replaced in the following file
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/android/AndroidManifest.xml.in ${CMAKE_CURRENT_SOURCE_DIR}/android/AndroidManifest.xml)
-- 
GitLab