SiarheiFedartsou / fastlane-plugin-versioning

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

Increment last part of build number #12

Closed awph closed 6 years ago

awph commented 6 years ago

Increment last part of build number

The current version of increment_vuild_number_in_plist action works properly only with an integer build number (e.g. 42 will be bumped to 43).

The proposal in this pull request is to allow the use advanced builder number. The idea is to bump the last part of the build number. For example, you can have a project using a build number based on version number. Let's say you defined 2.0.0 as the version number and 2.0.0.1 as the build number. By bumping only the last part of the build number, it will result in 2.0.0.2. Of course, it will always work the same way for integer number because it is the last and only part.

From my point of view, I do not see any real use case where it makes sense to allow major, minor, patch, build, etc... build number increment as the increment_version_number_in_plist action.

Another improvement would be to add an option for the action to automatically base the build number on the version number.

A simple example is illustrated in the following table.

Version number Build number Incremented build number
2.0.0 2.0.0.1 2.0.0.2
2.0.0 2.0.0.2 2.0.0.3
2.0.1 2.0.0.3 2.0.1.1
SiarheiFedartsou commented 6 years ago

@awph Thanks for your contribution!