Module: Pindo::Options::BuildOptions
- Extended by:
- OptionGroup
- Defined in:
- lib/pindo/options/groups/build_options.rb
Overview
通用构建参数组定义跨平台(iOS/Android)的构建参数
Class Method Summary collapse
Methods included from OptionGroup
all, all_options, except, merge, select
Class Method Details
.all_options ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/pindo/options/groups/build_options.rb', line 11 def self. @all_options ||= { bundleid: OptionItem.new( key: :bundleid, description: '指定打包的 Bundle ID', type: String, env_name: 'PINDO_BUNDLE_ID', aliases: [:bundle_id, :package_name, :bundle_name], optional: true, verify_block: proc do |value| # 支持 iOS 格式 (com.example.app) 和 Android 格式 (com.example.app) # iOS 可以包含大写字母、连字符和通配符(*) unless value =~ /^[a-zA-Z0-9\-\.\*]+$/ raise "Bundle ID/Package Name 格式错误: #{value},应该类似 com.example.app 或 com.example.*" end end, example: 'pindo ios autobuild --bundleid=com.example.app' ), build_type: OptionItem.new( key: :build_type, description: '指定构建类型(dev/adhoc/release)', type: String, env_name: 'PINDO_BUILD_TYPE', default_value: 'dev', optional: true, verify_block: proc do |value| valid_types = ['dev', 'adhoc', 'release'] unless valid_types.include?(value.to_s.downcase) raise "构建类型错误: #{value},必须是 dev、adhoc 或 release 之一" end end, example: 'pindo ios autobuild --build_type=release' ), scheme: OptionItem.new( key: :scheme, description: '指定构建 Scheme', type: String, env_name: 'PINDO_SCHEME', optional: true, example: 'pindo ios autobuild --scheme=MyAppScheme' ) } end |