SAP / cloud-mta-build-tool

Multi-Target Application (MTA) build tool for Cloud Applications https://sap.github.io/cloud-mta-build-tool
Apache License 2.0
141 stars 62 forks source link

automatic version update for an mta and its modules #906

Open ryenus opened 3 years ago

ryenus commented 3 years ago

As a packaging tool, mbt should support automatic version update, that is, it should be possible to bump part(s) of <major>.<minor>.<patch> version automatically for the mta itself as well as all its modules.

Let's say in an MTA app there're a UI module using node, and a service module using maven, then we have three version numbers at least:

  1. the version of the mta itself inside the mta.yaml or mtad.yaml
  2. the version of the node module, in package.json
  3. the version of the maven (java) module, in pom.xml

Surely it's possible to conquer these items separately using the proper tools available, but it would be best to have mbt manage the version numbers collectively.

MatthiasSchmalz commented 2 years ago

I have raised a similiar question to Piper team: https://github.com/SAP/jenkins-library/issues/3413 Piper does not support updating the versions of all MTA modules but only the mta.yaml version. They have proposed to ask for an mbt feature to set the version before the build.

njames commented 1 year ago

Searching for a way to do this led me here. Given this issues has not changed does anyone know of a open source alternative?

gregorwolf commented 1 year ago

Hi @njames,

the approach that @dse82 introduced in our project is the following:

  1. Our Gitlab issues are tagged with a Changelog Type: Screenshot 2023-08-24 at 08 12 00
  2. The Merge Request is created from the issue and is linked to it
  3. When merging into main a script reads via the Gitlab API the linked issue and adds it's title and ID in the right category of the changelog
  4. For a release we run a script that updates the MTA version as well the version of all package.json files in the project