SiarheiFedartsou / fastlane-plugin-versioning

Extends fastlane versioning actions. Allows to set/get versions without using agvtool and do some other small tricks.
MIT License
509 stars 61 forks source link

How to change all targets version or build number? #8

Closed wongzigii closed 7 years ago

wongzigii commented 7 years ago

I am trying to do so to change all targets version or build number at once:

def prepare_version(version)
    increment_version_number_in_plist(
      # specify specific version number (optional, omitting it increments patch version number)
      version_number: version,
      target: ['A', 'B', 'C']
    )
end

What I have to do now:

def prepare_version(version)
    increment_version_number_in_plist(
      # specify specific version number (optional, omitting it increments patch version number)
      version_number: version,
      target: 'A'
    )
    increment_version_number_in_plist(
      # specify specific version number (optional, omitting it increments patch version number)
      version_number: version,
      target: 'B'
    )
    increment_version_number_in_plist(
      # specify specific version number (optional, omitting it increments patch version number)
      version_number: version,
      target: 'C'
    )
end

Is there any proper way to do this?

SiarheiFedartsou commented 7 years ago

@wongzigii for now this plugin doesn't give such possibility. But I think you can use default fastlane's actions(increment_version_number, increment_build_number). These actions change versions/build numbers in all targets by default. If it doesn't fit your requirements feel free to reopen the issue.