Automatic detection of newer version and updating
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 523
- Forks
- 75
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 24
Description
Summary of the new feature / enhancement
On startup dsc should check if there is a newer version available (probably a simple REST GET request to a well-known URL) and inform the user they can use dsc update to auto-update itself.
Proposed technical implementation details (optional)
As part of the request, will need to send the OS and DSC version, and the packaging as part of the agent string. Have an env var DSC_DISABLE_UPDATE_CHECK to opt-out of this behavior.
dsc update on Linux/macOS can update in-place. However, on Windows, you can't update an open file. Instead, it may make sense to have a dsc-update.exe who's sole purpose is to download the package (zip/tar), unpack to temp location, and overwrite the existing installation. On Windows, it would also have to check that none of the files in the folder are in use. To allow the update to update dsc-update.exe, dsc would copy dsc-update.exe to the temp folder and spawn it from there giving it the home directory of the current dsc being run (this way if you have multiple versions, it would only update the one you ran).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the dsc startup path and the existing dsc update command. Define the version-check request, opt-out behavior, platform-specific update flow, and package replacement process; done means newer versions are detected and users can update safely on Linux, macOS, and Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100