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 setting a target version for uv self update #6642

Closed
hofrob opened this issue Aug 26, 2024 · 1 comment · Fixed by #7252
Closed

Allow setting a target version for uv self update #6642

hofrob opened this issue Aug 26, 2024 · 1 comment · Fixed by #7252
Labels
help wanted Contribution especially encouraged releases Related to building and distributing release artifacts of uv

Comments

@hofrob
Copy link

hofrob commented Aug 26, 2024

what

Add cli/env parameter to uv self update to allow updating to a given uv version. Right now, running uv self update will update to the latest version. According to the docs (uv self update --help and uv help self update) there is no way to define the target version.

why

This would help in the CI and dev environments. All these environments should use the same version to be able to reproduce bugs or dependency issues for example.

side effect

No unnecessary API requests ("is there a new version?") during CI jobs.

how

  • uv self update --target 0.3.3 (-t)
  • uv self update --target-version 0.3.3 (-t)
  • uv self update --uv-version 0.3.3 (-u)
  • uv self update --to 0.3.3 (-t)

additional

Similarly, listing available versions + github release link via something like uv self versions might be a good idea.

@charliermarsh charliermarsh added the releases Related to building and distributing release artifacts of uv label Aug 26, 2024
@astral-sh astral-sh deleted a comment Aug 26, 2024
@zanieb
Copy link
Member

zanieb commented Aug 29, 2024

@zanieb zanieb added the help wanted Contribution especially encouraged label Aug 29, 2024
charliermarsh pushed a commit that referenced this issue Sep 10, 2024
## Summary

Resolves #6642 

## Test Plan

```console
❯ cargo build --bin uv --features self-update
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.78s
❯ cp target/debug/uv ~/.cargo/bin
❯ uv self update 0.3.4
info: Checking for updates...
success: Upgraded uv from v0.4.8 to v0.3.4! https://github.com/astral-sh/uv/releases/tag/0.3.4
❯ uv --version
uv 0.3.4 (39f3cd2 2024-08-26)
❯ cp target/debug/uv ~/.cargo/bin
❯ uv self update
info: Checking for updates...
success: Upgraded uv from v0.3.4 to v0.4.8! https://github.com/astral-sh/uv/releases/tag/0.4.8
❯ uv --version
uv 0.4.8 (956cadd 2024-09-09)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contribution especially encouraged releases Related to building and distributing release artifacts of uv
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@hofrob @charliermarsh @zanieb and others