none
How to Automatically Generate Version Numbers RRS feed

  • Question

  • I need package.json to automatically increment the version of the application itself at each time I do a commit. Is there a way to do it? Ie. initial release will be 0.0.1 then it will go up to whatever number until I say version up then from 0.0.131 it will bump itself up to 0.1.0 then it will go again some way lets say this time 0.1.29 I wanted to bump, It will be 0.2, etc... 

    Is there an automatic way to handle this rather than enter by hand?

    Tuesday, October 1, 2019 1:37 PM

All replies

  • Thanks for reaching out! Can you please let me know if you want to use runbook to automate the increment of version?

    Here are few ways on how to automate the version number.

    1) If you are using Jenkins build, here is an SO issue that might help you.

    2) If you are using Azure Devops pipeline. You can take advantage of Build Number format in Options tab of pipeline and increment the build and use a powershell script to update the package.json. Here is an link to similar issue.

    Thursday, October 3, 2019 11:14 AM
    Moderator