Skip to content

Improve make release to support major version bumps #1172

@matheuscscp

Description

@matheuscscp

After releasing tar v1 GA we noticed that make release errors out requiring changes back to v0 after the prep PR was merged with our manual bump from v0 to v1:

https://github.com/fluxcd/pkg/pull/1169/commits

$ make release
Current branch: main
Release mode: minor
Bumped tar: 0.17.0 => 0.18.0 in modules: artifact, http/fetch, oci
Error: modules need to be bumped, please run 'make prep' first and open a pull request
make: *** [Makefile:155: release] Error 1

We need to change the code under cmd/ invoked by make release to make it tolerate bumps like that where the current version in the module references across the codebase is greater than the tag it thinks should be the correct one. In this case, it should have seen that v1.0.0 is greater than v0.18.0 and should have accepted the release operation using the greater tag, i.e. v1.0.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ciCI related issues and pull requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions