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

Allow running upgrade-provider if there is no associated GH release #255

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Mar 13, 2024

Fixes #254

@iwahbe iwahbe requested review from guineveresaenger and a team March 13, 2024 17:14
@iwahbe iwahbe self-assigned this Mar 13, 2024
var latestReleaseVersion = stepv2.Func11E("Latest Release Version",
func(ctx context.Context, repo string) (*semver.Version, error) {
var latestReleaseVersion = stepv2.Func12E("Latest Release Version",
func(ctx context.Context, repo string) (*semver.Version, bool, error) {
Copy link
Member

Choose a reason for hiding this comment

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

What does the bool signify?

Copy link
Member Author

Choose a reason for hiding this comment

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

If a release was found. It's equivalent to checking if the *semver.Version is nil, but that felt like a footgun for go. Generally, for (*T, error), I assume that error == nil <=> *T != nil

@iwahbe iwahbe merged commit 6c44568 into main Mar 14, 2024
2 checks passed
@iwahbe iwahbe deleted the iwahbe/254/allow-no-gh-release branch March 14, 2024 17:40
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.

upgrade-provider fails when the provider doesn't have a release yet.
2 participants