From 1845e6113e9f06ce01a67ac68863d740148e0aba Mon Sep 17 00:00:00 2001 From: ubuntu1804 Date: Tue, 11 Nov 2025 17:00:01 +0800 Subject: [PATCH] VERSION update to 1.3.0 --- CMakeLists.txt | 2 +- make_deb.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63f7814..07e955a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(ScreenLockDetector VERSION 1.0.0 LANGUAGES C CXX) +project(ScreenLockDetector VERSION 1.3.0 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/make_deb.sh b/make_deb.sh index d2013ae..d9703a2 100755 --- a/make_deb.sh +++ b/make_deb.sh @@ -12,7 +12,13 @@ NC='\033[0m' # No Color # 配置变量 APP_NAME="ScreenLockDetector" PACKAGE_NAME="ScreenLockDetector" -VERSION="1.2.0" +# 从 CMakeLists.txt 中提取版本号 +VERSION=$(grep -oP '(?<=project\(ScreenLockDetector VERSION )[0-9.]+' CMakeLists.txt) +if [ -z "$VERSION" ]; then + echo -e "${RED}错误: 无法从 CMakeLists.txt 中提取版本号${NC}" + exit 1 +fi +echo -e "${GREEN}✓ 从 CMakeLists.txt 读取版本号: ${VERSION}${NC}" ARCH="amd64" QT_DIR="$HOME/sdk/qt-5.15.2" LINUXDEPLOYQT="${LINUXDEPLOYQT:-$HOME/tools/sunvpack-py/bin/linuxdeployqt}"