SemVer best practices

Hi

I’m creating proof of concept with concourse, for migrate from Jenkins. My app is composed by different microservices, each one in a different git repo.

I’m trying to figure out how to work with semver resource. I prefer to store versions file in git instead of S3 and I think to store the version number in each repo is not a good idea because it will create a new commit in the app repo. So for me, the best option is to store in a dedicated git all version files for all projects. Is this a best practise? how do you work with version files in different projects for the same app?

I think keep in git all related version files, could give more power to launch some tests when an micro service is updated. What do you think?

In case you use git as backend for semver, you push a new version updates to master?

Is there any best practice working with semver resource for keep in sync all app components?

Thanks!

This is exactly what we do, and we are doing it for the same reasons. We manage a separate repository for versioning our services to avoid the extra commit on creating a release.

The version repository is used for 20+ different services all maintained by the same concourse team

During the build step we then create a file in the build artifact with the current version.

During the create release step (which may not happen on every build) we take that version file and use it to tag the git source repository (vX.Y.Z).

So - the version is not an actual file in the source tree - but is a file in the built artifact. The tag in your source tree helps you compare total changes between versions.