DEV Community

Cover image for iOS — How to handle Semantic Auto-Versioning on CI
Raksha for Canopas Software

Posted on

iOS — How to handle Semantic Auto-Versioning on CI

Want to automate your deployment with auto-versioning and save 25% of your time?

In this article we’ll explore How to handle Semantic Auto-Versioning on CI. We will follow semantic versioning.

Basically, the version name will be created with the combination of major, minor, and patch numbers.

For example, for app version 1.4.0 —

1 - major number
4 - minor number
0 - patch number

If we want to auto-deploy apps on every commit, we can keep major and minor versions static. Make the patch number dynamic.

For patch number, we can use the pipeline ID which changes with every commit, thus every build with have a unique version name and number.

*We will need to make 3 changes in our project to support auto-versioning.
*

  1. Add VERSION file
  2. Update deployment script
  3. Update Project files

Once done, you will never have to worry about pushing build on CI. Commit your changes and you will have a build ready on Testflight within a few minutes.

For implementation details, visit our blog.

Top comments (0)