From bed58065b0b060d5b38f4eef88b667a30bb921cf Mon Sep 17 00:00:00 2001 From: liyi Date: Fri, 16 May 2025 18:01:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4tag=E6=98=B5=E7=A7=B0?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/fastlane/Fastfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index 3591770d..702fd5aa 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -132,7 +132,12 @@ platform :ios do print_log "build flavor: #{flavor}" build_number = Time.now.strftime("%Y%m%d%H%M") print_log "Build Commits #{build_number}" - build_version = $current_tag.match(/^v(\d+\.\d+\.\d+)/).captures[0] + m = $current_tag.match(/^(sky_)?v(\d+\.\d+\.\d+)/) + if m + build_version = m.captures.last + else + UI.user_error!("Tag格式不正确,无法提取版本号: #{$current_tag}") + end print_log "build_version #{build_version}" commit_hash = last_git_commit short_hash = commit_hash[:abbreviated_commit_hash]