-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
caddy upgrade
can downgrade Caddy
#4057
Comments
I'm guessing that the currently installed version is not checked in Line 582 in f6bb02b
|
@xdevs23 Correct. The problem I'm currently wrestling with is, I'm not sure how to know what the new version will be before Go builds it. Without an explicit version passed into the As for:
This is not actually the case, as discussed in the thread; it just gets cleaned up afterward after a successful upgrade. We can consider leaving it though. |
Would it be possible to have an API endpoint (or maybe just a file in each GitHub release) containing its own version? https://github.com/caddyserver/caddy/releases/download/latest/version.txt And then just parse the semver and check if it's newer (and not a version that has an extra string at the end like This could be incorporated into the cmdUpgrade function so that checking for a new version is just a simple GET call with a text response. |
Someone showed me how to get the version that the
|
@mholt apparently this could work too (note the
e.g.
But unfortunately I don't think we can actually test this right now because the latest version happens to be a stable version, since we just released |
I stumbled into this issue and accidentally opened duplicate issue #4159 Another thing to think about is whether a plugin update should ideally trigger an upgrade. I don't know how any of this is managed on the back-end but, if Caddy isn't updated and one of the requested plugins has an update, should this trigger an upgrade? Would this be more easily solved with an upgrade web service? I'm imagining something like:
|
This is a partial fix for #4057, making it possible to retain the old build of Caddy, in case something went wrong.
This is a partial fix for #4057, making it possible to retain the old build of Caddy, in case something went wrong.
This is a partial fix for #4057, making it possible to retain the old build of Caddy, in case something went wrong.
This is a partial fix for #4057, making it possible to retain the old build of Caddy, in case something went wrong.
* caddycmd: Add `--skip-cleanup` to upgrade commands This is a partial fix for #4057, making it possible to retain the old build of Caddy, in case something went wrong. * caddycmd: Fix duplicate error message The error message "download succeeded, but unable to execute" was repeated, because it was both in the `listModules`/`showVersion` functions and in the calling `upgradeBuild` function. Oversight when this was refactored. * caddycmd: Implement fix for performing cleanup on Windows Without this, the cleanup operation would fail with an error message like this: upgrade: download succeeded, but unable to clean up backup binary: remove C:\caddy\caddy.exe.tmp: Access is denied. * caddycmd: Rename to `--keep-backup`, simplify build constraints
I always run |
Two issues:
2.. Backup file caddy.tmp is not created.
For details, please refer to https://caddy.community/t/caddy-2-4-0-beta-1-is-now-available/11519/17?u=basil
The text was updated successfully, but these errors were encountered: