1
0
mirror of https://github.com/hashicorp/packer.git synced 2026-02-05 12:45:10 +01:00
Files
packer/scripts
claire labry 0d94e7d753 Introduce action-set-product-version for Packer (#12135)
This change introduces the new actions-set-product-version, a tiny, but mighty, GitHub action that acts as a bridge between the product repo and our new CRT feature: automated version bumping.

tl;dr automated version bumping has a new command (bob update version) in the bob CLI that automatically bumps the version to a new patch. This automation has been introduced to crt-workflows-common as a new workflow (with the new bob command) and handles version bumping at the end of the release pipeline (after being released to production); for example, 1.0.0→1.0.1 and 1.0.0-dev→1.0.0. Bumping the minor version (ie 1.0.x→1.1.0) is only supported manually via bob update version -bump minor, but not supported in CRT (this work is upcoming). This is made possible by adding the new event “bump-version” in the ci.hcl file in this PR.

What this small action does:

    Allows for the static version string from the version/VERSION file to be read by the new CRT workflow and automagically be bumped to the next version (whether it be a minor, or patch, or major version bump).
    Outputs an error if there’s no VERSION file in the version dir
    Outputs an error if there’s no version string in the VERSION file
    Is able to parse product_version if it is 1.3.0-alpha1 as 1.3.0 (example: when product_version = 1.3.0-alpha1, base_version = 1.3.0)
    Is able to parse prerelease product versions such as alpha1 (example prerelease_product_version = alpha1) in the statement above.
2023-01-19 14:02:09 -05:00
..
2019-05-17 14:58:20 -07:00
2020-02-14 16:14:01 -08:00
2020-02-14 16:14:01 -08:00