Skip to content

Versioning builds from git tag #3286

@damian-molinski

Description

@damian-molinski

Summary

We need to be able to setup build-name and build-number dynamically for our artefacts

Description

Development of prepare-build_config earthly target in cat-ci repo.

+prepare-build_config:
    ARGS TAG
    ...
    SAVE ARTIFACT build_config.env AS LOCAL
  • Tries to extract build-name from TAG and fallbacks to 0.0.1 if not found.
  • Tries to extract build-number from TAG and fallbacks to $(date +%s) if not found.
  • Has argument ALLOW_BUILD_NAME_SUFFIX and adds suffix such as -rc1 to build-name if found.

Context

At the moment we're using current timestamp (--build-number=$(date +%s)) when building web and skipping build-name.

When create a release we're using pattern of project/vx.x.x (voices/v1.1.0) after which we may add more informations such as build-name or if its release candidate.

Examples:

  • voices/v1.2.0+10-rc1
  • voices/v1.2.0+10
  • voices/v1.2.0

this would mean

  • build-name=1.2.0 --build-number=10 or build-name=1.2.0-rc1 --build-number=10
  • build-name=1.2.0 --build-number=10
  • build-name=1.2.0 --build-number=$(date +%s)

all of above are valid and we should be able to try parsing such tag and extract as much informations as possible.

Notes

  • for android build-name is a String so suffixes such as -rc1 are allowed but on iOS it have to be int.int.int so extracting build-name from tag should allow configuring that.

https://github.com/input-output-hk/catalyst-voices/releases/tag/voices%2Fv1.1.0
https://github.com/input-output-hk/catalyst-voices/releases/tag/gateway%2Fv1.0.1-rc1

Metadata

Metadata

Labels

squad: faceFrontend Catalyst Experience Team

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions