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

RFC: Add option to hex.retire to retire or unretire a group of releases #564

Closed
supersimple opened this issue May 8, 2018 · 3 comments
Closed

Comments

@supersimple
Copy link
Member

I have a use-case where I want to retire all 1.x versions of a package. Rather than individually retiring each release, I was hoping to do them all at the same time. I think the common action is just to retire the most recent release which would not show the flag in the CLI nor the banner on hexpm if a user is a point release behind.

My initial idea was mix hex.retire PKG VER --major or mix hex.retire PKG VER --minor which would apply the retirement to all releases in that major version or minor version.

Another idea is to have --to and --from options which would accept a range of versions.

Thoughts?

@wojtekmach
Copy link
Member

To me this doesn't seem to be a common enough use case to justify adding more code. I'd suggest to solve it with a little scripting:

for v in 1.0.0 1.0.1 1.0.2; do mix hex.retire $pkg $v $reason --message "$message"; done

fwiw when using mix hex.info we'd only get several recent versions and there isn't another built-in way to get all published versions. We can get them from API easily though:

~% curl --silent https://hex.pm/api/packages/ecto | jq ".releases[].url" | tr -d '"' | cut -d/ -f8 | grep ^1
1.1.9
1.1.8
1.1.7
(...)

@supersimple
Copy link
Member Author

@ericmj I will close this later today unless you want to discuss it further. I see some value in the feature, but I respect the maintainers opinion on not want to add complexity to the project for little gain.

@ericmj
Copy link
Member

ericmj commented May 16, 2018

Thanks for the feature request, let's wait and see if we get similar requests and maybe we can nail down a good API when we have more use cases.

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

No branches or pull requests

3 participants