Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add generic bumpVersions option #34023

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

secustor
Copy link
Collaborator

@secustor secustor commented Feb 4, 2025

Changes

Implements bumpVersions which leans the semantics of our custom managers

Context

Closes #28045

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

https://github.com/secustor/renovate-bump-versions

@secustor secustor requested review from viceice and rarkins February 4, 2025 09:56
lib/config/options/index.ts Outdated Show resolved Hide resolved
});

afterEach(() => {
jest.spyOn(templates, 'compile').mockRestore();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure Jest.spyOn will reuse the last spy? 🤔 I thought it always created a new spy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the case. If I remove this line all tests after the ones which make of jest.spyOn will fail.

let newVersion: string | null = null;
try {
const bumpType = compile(config.bumpType, branchConfig);
newVersion = inc(version, bumpType as ReleaseType);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should document that only semver is supported

Copy link
Collaborator Author

@secustor secustor Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documented here

lib/workers/repository/update/branch/index.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[META] Allow to bump generic version references via new bumpVersions config option
2 participants