Is there any way to auto increment the android app version name and version code.
My app version name format-- major.minor.0.build (1.2.0.221) Version code format -- number of commits (115)
my app manifest file, I have included these two variable
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mytest"
android:versionName="1.2.0.221" android:versionCode="115">
<uses-permission android:name="android.permission.INTERNET" />
In my azure devops i referred my app manifest file and declared the version code and name like below.
Version Code Format ----- User Defined/Build Id
Version Code (must be integer) ---- $(NUMBER_OF_COMMITS)
Version Code Offset-----1
Version Name --- $(MAJOR).$(MINOR).$(SNAP).$(BUILD)
and I placed by version bumping task above to the android build task. I have defined pipeline variables.
MAJOR ----1
MINOR-----2
NUMBER_OF_COMMITS ---115
SNAP ---- 0
BUILD-----221
And In options tab, I have defined build format like
Build number format ------$(MAJOR).$(MINOR).$(SNAP).$(NUMBER_OF_COMMITS)$(Rev:r)
When i run the pipeline, Through the version bumping taking, the version code was incremented to 116 and published to the APP center with the incremented value.
But, the next time the version code is not incremented from 116 , its again from 115. so, In app center, we can see each release with same version name and version code.
How to auto increment the version code and version name, Where I am doing mistake.