LoginSignup
1
1

More than 5 years have passed since last update.

fastlane でビルド番号をインクリメントするときに increment_build_number では具合が悪い場合の方法

Last updated at Posted at 2018-08-24
  • 実行環境
    • Xcode 9.3
    • Swift 4.1
    • Ruby 2.5.0
    • fastlane 2.102.0

通常、ビルド番号の繰り上げには increment_build_number を使いたいところですが、increment_build_number はすべての Info.plist を更新するので、開発用とリリース用で Info.plist を分けている場合なんかには具合が悪いです。

そこで次の Action を組み合わせて対応しました。

get_info_plist_valueset_info_plist_value の代わりに update_plist を使ってもよい

app_version = get_info_plist_value(path:'Info.plist のパス', key: 'CFBundleShortVersionString')
build_number = latest_testflight_build_number(app_identifier: 'Bundle ID', version: app_version)
build_number = (build_number.to_i + 1).to_s
set_info_plist_value(path: 'Info.plist のパス', key: 'CFBundleVersion', value: build_number)
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1