azure-devopsazure-pipelinesvisual-studio-app-center

Increment Build & Version Number of Android App using Azure DevOps & App Centre


I am using Azure DevOps and AppCenter(Distribution) for implementing my CICD. Based on the steps mentioned below I have implemented the both CI & CD tasks.

Thant means,

I will create the build using Azure Devops (VSTS) & Push that in to App Centre.

Steps I Follow

Here my doubt is,

How I can increment my Build and Version numbers while distributing these builds?
enter image description here


Solution

  • The easy way is to install Mobile App Tasks for iOS and Android extension for Azure DevOps. You get a task "Bump Version" (for Andriod and iOS).

    The task change app's version name and code at build time.

    Inputs:

    sourcePath - Path to android manifest

    versionCode - code number that must be an integer (put the build number variable, it's incremented automatically)

    versionCodeOffset - a specific number to increment the version code

    versionName- user visible name

    printFile - output the file before and after changing variables

    Another option is to install Colin's ALM Corner Build & Release Tools extension and use the Version Assemblies task following this detailed tutorial.

    Check also this question & answer.