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

cmd/use cmd/install: add --latest to directly install latest release tag #86

Merged
merged 10 commits into from
May 26, 2024

Conversation

irkode
Copy link
Contributor

@irkode irkode commented May 26, 2024

implements: #85

  • switch name: --latest switch
  • kept `useLatest as name for the flag variable
    • just if latest reads bad for me because it does not check if its latest but tells to use the latest version

Copy link
Owner

@jmooring jmooring left a comment

Choose a reason for hiding this comment

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

In addition to these minor comments, this doesn't work when sortAscending = true.

cmd/install.go Outdated Show resolved Hide resolved
cmd/use.go Outdated Show resolved Hide resolved
cmd/use.go Outdated Show resolved Hide resolved
@jmooring
Copy link
Owner

jmooring commented May 26, 2024

The easiest way to handle this is to add a latestTag field to the repository struct and populate it from fetchTags() after filtering out non-semver tags but before the optional sort.

@jmooring
Copy link
Owner

I guess I wasn't clear. Store the latest version (a string) in the struct.

@irkode
Copy link
Contributor Author

irkode commented May 26, 2024

you are always too fast for me - thought we can skip processing the all the tasks - skip futher explanation.
rethinking - having the latest version available may come handy ...

will update , sry

@irkode
Copy link
Contributor Author

irkode commented May 26, 2024

and you are definitely right: much cleaner implementation - sry for the inconvenience

cmd/use.go Outdated Show resolved Hide resolved
cmd/use.go Outdated Show resolved Hide resolved
irkode and others added 2 commits May 26, 2024 19:05
Co-authored-by: Joe Mooring <[email protected]>
Co-authored-by: Joe Mooring <[email protected]>
@jmooring
Copy link
Owner

OK, this looks good. Thanks.

@jmooring jmooring merged commit bb2a65d into jmooring:main May 26, 2024
5 checks passed
@irkode irkode deleted the use-latest branch November 22, 2024 19:32
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.

2 participants