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]