You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"latest" command with no versions causes panic #33
Oh, yea it seems I need a len(...) > 0 check.
However, that brings up another question, what should latest output when you have no releases?
Would you expect an empty string, a generic output like "no-release", maybe "v0.0.0"?
I'm not yet sure what I would expect as the output since I wasn't able to see what a normal output would be with existing releases. I was just starting to explore the interface. Is latest expected to be used programatically to capture the output and use the release version string? If so, I guess "v0.0.0". Otherwise I might expect either no output or something like "unreleased".
Activity
miniscruff commentedon Dec 28, 2020
Oh, yea it seems I need a len(...) > 0 check.
However, that brings up another question, what should latest output when you have no releases?
Would you expect an empty string, a generic output like "no-release", maybe "v0.0.0"?
justinfx commentedon Dec 28, 2020
I'm not yet sure what I would expect as the output since I wasn't able to see what a normal output would be with existing releases. I was just starting to explore the interface. Is
latestexpected to be used programatically to capture the output and use the release version string? If so, I guess "v0.0.0". Otherwise I might expect either no output or something like "unreleased".miniscruff commentedon Dec 28, 2020
Yea it is aimed at storing the latest release for other commands, for example if you are using goreleaser. Changie uses it in the release workflow here https://github.com/miniscruff/changie/blob/main/.github/workflows/release.yml#L22.
Edit: I will use v0.0.0 as it is the default value go mod uses when pulling in untagged repos.