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

fix(go): fix go module double suffix on major upgrade #8946

Merged
merged 4 commits into from
Mar 5, 2021

Conversation

56KBs
Copy link
Contributor

@56KBs 56KBs commented Mar 2, 2021

Changes:

when upgrading a major version in which the module contains the version, the new major version would be appended to the current module, resulting in a module URL which was incorrect.

this fixes the logic to ensure that we only pin the latest version if we don't currently have a version, otherwise we will add/replace the version where applicable

Context:

Closes #8525 & Closes #8562

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 tick one)

I have verified these changes via:

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

Matthew Palmer added 3 commits March 2, 2021 17:53
when upgrading a major version in which the module contains the version, the new major version would be appended to the current module, resulting in a module URL which was incorrect.

this fixes the logic to ensure that we only pin the latest version if we don't currently have a version, otherwise we will add/replace the version where applicable
depName should include the full version, this change managed to escape the previous commit
checking the current value is v0/v1 is not necessary as adding the version for the dependency name is always required if it does not exist, regardless of current versions

if the dependency already had a version within the dependency name, it will be replaced with the new major version
@56KBs 56KBs marked this pull request as ready for review March 3, 2021 11:07
@rarkins rarkins enabled auto-merge (squash) March 5, 2021 09:17
@rarkins rarkins merged commit b695297 into renovatebot:master Mar 5, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 24.73.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@56KBs 56KBs deleted the fix/go-major-double-url branch March 8, 2021 09:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants