fastlane: Fastlane "increment_build_number" not working after update Fastlane or xcode...

Hi!

Just updated both Fastlane and Xcode to the latest version and both increment_build_number and increment_version_number are not working anymore… It doesn’t throw an error, it just doesn’t update.

The xcode project hasn’t been changed at all… The code is pretty straight forward:

increment_build_number build_number: $appJson['version_no'] increment_version_number version_number: $build_number

Complete fastfile:

platform :ios do


    desc "Test!"
    lane :test do

        # This doesn't require any thing, because it is all done in the "Before all lane"
        set_info_plist_value(path: './Roadmap-Info.plist', key: 'CFBundleIdentifier', value: "$(PRODUCT_BUNDLE_IDENTIFIER)")

        # Set identifier
        update_app_identifier(
          xcodeproj: 'Roadmap.xcodeproj', # Optional path to xcodeproj, will use the first .xcodeproj if not set
          plist_path: 'Roadmap-Info.plist', # Path to info plist file, relative to xcodeproj
          app_identifier: 'com.demo.test' # The App Identifier
        )

        increment_build_number build_number: '6.1.2'

        increment_version_number version_number: '20160322'
    end

    # After no errors!
    after_all do |lane|

        p "We finished succesfuly!"

    end

    # Error!
    error do |lane, exception|
        puts "We crashed.... Send me an e-mail!"
        # Do something!
    end
end

Output:

[15:05:18]: ------------------------------------
[15:05:18]: --- Step: increment_build_number ---
[15:05:18]: ------------------------------------
[15:05:18]: $ cd /Users/roadmap/Documents/MobiPoweriOS && agvtool new-version -all 6.1.2
[15:05:18]: ▸ Setting version of project Roadmap to:
[15:05:18]: ▸ 6.1.2.
[15:05:19]: ▸ Also setting CFBundleVersion key (assuming it exists)
[15:05:19]: ▸ Updating CFBundleVersion in Info.plist(s)...
[15:05:19]: ▸ Cannot find "Roadmap.xcodeproj/../              <key>INFOPLIST_FILE</key>"
[15:05:19]: --------------------------------------
[15:05:19]: --- Step: increment_version_number ---
[15:05:19]: --------------------------------------
[15:05:19]: $ cd /Users/roadmap/Documents/MobiPoweriOS && agvtool new-marketing-version 20160323
[15:05:20]: ▸ Setting CFBundleShortVersionString of project Roadmap to:
[15:05:20]: ▸ 20160323.
[15:05:20]: ▸ Updating CFBundleShortVersionString in Info.plist(s)...
[15:05:20]: ▸ Cannot find "Roadmap.xcodeproj/../              <key>INFOPLIST_FILE</key>"

Environment

fastlane version (fastlane -v): 1.67.0 xcode version: 7.3 Do you use bundler, rbenv or rvm? RVM

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

Look like its defined here.

I think this needs to be bumped to minimum 1.0.0.beta.3

You can put the Fastfile in a subdir => Dir_where_xcodeproj/Fastlane/Fastfile

Due other error I have removed increment_build_number, using now a private lane ‘update_build_number’ update_build_number sets the build number to the commit count of “master”

  private_lane :update_build_number do 
    build_number = :get_release_build_number
    `agvtool new-version -all #{build_number}`
  end

  private_lane :get_release_build_number do    
    build_number =  `git rev-list --count master..`
    build_number
  end

Hi @mcactive. Thanks for letting us know. Can you edit to include your fast file?

Follow the template here: https://github.com/fastlane/fastlane/blob/master/ISSUE_TEMPLATE.md

Also, what version of Xcode are you using?

Thanks!