0

Semantic versioning is recommended for angular libraries. But how is versioning handled for library builds that are under development? In a development branch, when I make a commit, the CI triggers the build and publishes the package to my Artifact Server (Azure Artifacts in my case), so the next commit fails to publish due to a version conflict. Incrementing version per commit is incorrect.

Like in maven we have snapshots, snapshots are mutable, releases are immutable. So builds from development branches are suffixed with SNAPSHOT and can be build again and again and publish repeatedly to the artifact store. Once fully developed and tested we change SNAPSHOT --> RELEASE and publish.

Is there anything similar in angular?

Is it a correct practice to append build no or timestamp to the artifact version in development?

Alok Patra
  • 409
  • 6
  • 13
  • 1
    I am not familiar with Angular, but it is not uncommon for CI builds to add a prerelease tag to the version number. It sounds like you've made the very common mistake of trying to maintain semantic version information in your repo. The appropriate version number cannot be known until after the build and test phases have completed, well after the code is committed to the repo, so why would you ever check-in a version bump? – jwdonahue May 10 '21 at 00:16
  • We support ensuring unique version information via Reliza Hub. Usually we set different versioning strategy for branches - namely Branch.Patch, however other strategies are also possible. See https://worklifenotes.com/2020/02/27/automatic-version-increments-with-reliza-hub-2-strategies/ for details and feel free to join our Discord Server for support - https://discord.gg/UTxjBf9juQ – taleodor May 10 '21 at 03:32

0 Answers0