From e4a6b1bff96cb104b46c33215ae80baaea710948 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Fri, 4 Apr 2025 19:51:24 +0800 Subject: [PATCH] fix: don't check hash and version in meson.build --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 9f29af3..6e04522 100644 --- a/meson.build +++ b/meson.build @@ -41,8 +41,8 @@ libwayland_client_dep = dependency('wayland-client') # 获取 Git Commit Hash 和最新的 tag git = find_program('git', required : false) if git.found() - commit_hash = run_command(git, 'rev-parse', '--short', 'HEAD', check : true).stdout().strip() - latest_tag = run_command(git, 'describe', '--tags', '--abbrev=0', check : true).stdout().strip() + commit_hash = run_command(git, 'rev-parse', '--short', 'HEAD', check : false).stdout().strip() + latest_tag = run_command(git, 'describe', '--tags', '--abbrev=0', check : false).stdout().strip() else commit_hash = 'unknown' latest_tag = meson.project_version() # 如果 Git 不可用,使用默认版本号