Has anyone succeeded with autoIncrement ?

Hello there,
I am trying to use the autoIncrement which is mentioned here . I am using this so the version get bumped automatically in the build server. It does work only one time , but it tried to build again, it uses the same old value. So now I need to go to app.json and increase the buildnumber manually , which does not really make any sense.

did it work for any one ?


autoIncrement is reading the current version form your project and updating it based on that,

  • if you run that on ci you need to commit those changes back to your repository(it’s not really intended for CI, but it’s possible to use it this way)
  • if you are running locally you can’t discard those changes

Thank you for your quick answer.

Why it is not intended for CI ? being used in CI is the best scenario of making use of it . Do you know how to autocommit in github without triggering the CI again ?

it’s not intended for ci because you need to commit changes back into repo which is not really an ideal process. To avoid committing those changes back into the repo we would need to keep versions of the apps on the server which introduces a different set of problems(we might implement that in the future, but for now it’s not on our roadmap).

You can name your commit with version bump in a specific way and at the start of ci job check if last commit was version bump. Or instead of using commit names, you can use cache to pass that info to the next ci job.

Yeah , it would be nice to have that on the sever.