ammachado opened a new pull request, #25072:
URL: https://github.com/apache/camel/pull/25072
## Summary
Follow-up to the JReleaser packaging work merged in #24915 (CAMEL-23703).
This adds
self-update and installation-diagnostics capabilities to the **Camel CLI
Launcher**, plus
hardening of the packaging/publishing scripts.
Two new user-facing commands:
* **`camel self-update`** — checks for and installs a newer launcher release
by re-running the
same published `install.sh` / `install.ps1` installer, pinned to the
resolved version. It
refuses to act on an installation managed by a package manager (Homebrew,
Chocolatey, WinGet,
Scoop, SDKMAN) or by JBang, naming that manager's own upgrade command
instead. Every `camel`
invocation (except `self-update` itself) also prints a one-line "update
available" notice, at
most once every 24 hours; set `CAMEL_SELF_UPDATE_CHECK=false` to disable
it.
* **`camel doctor`** — now additionally reports every Camel CLI installation
found on the machine
across the web installer and all supported package managers, marks which
one is active on
`PATH`, and exits non-zero when more than one is found.
## What's included
**Self-update (launcher, `selfupdate` package)**
- `InstallScriptFetcher` / `ManifestFetcher` — download and version-compare
against the published
website manifest and `install.sha256`.
- `SelfUpdateCommand` — delegates to the published installer, pinned to the
resolved version, and
refuses to run on a package-manager- or JBang-managed install.
- `UpdateChecker` + `SelfUpdatePlugin` — background, once-per-24h
update-available notice wired
into `CamelLauncherMain`.
- Pinned-version tracking so a deliberately pinned install is never silently
moved: `install.sh`
/ `install.ps1` write a pin on an explicit `--version`/`-Version` run and
clear it on a bare
run, skipping this when `CAMEL_INSTALL_SELF_UPDATE=true` (which
`SelfUpdateCommand` always sets
on its own delegated invocation).
**Installation diagnostics (jbang core)**
- `InstallDetector` — locates every Camel CLI installation across the web
installer and package
managers, plus `pinnedVersion()` / `pinnedVersionFile()`.
- `Doctor` — reports conflicting installations and marks the one active on
`PATH`.
**Packaging / publishing hardening**
- `camel-publish.sh` + `lib/publish-state.sh` + `lib/assert-camel-cli.sh` —
a real homebrew-core
PR workflow that actually clones and PRs against the external repo (the
previous version ran git
commands against the script's own working tree).
- `camel-validate.sh` — local Homebrew validation hardening.
- `camel-package.sh` / `stage-winget-distro.sh` — guard possibly-empty array
expansion so the
scripts run under bash 3.2 (macOS default) with `set -u`.
- Rename the Homebrew formula to `apache-camel`, pin the JDK to 21, add
`depends_on`, fix the
escaped livecheck regex, and add `deprecate!`/`disable!` lifecycle to the
versioned formula.
- Publish `install.sha256` alongside `install.sh` / `install.ps1`.
## Documentation
- New `camel-jbang-launcher-install.adoc` page documenting the installers,
`self-update`, and
`doctor`.
- Upgrade-guide entry in `camel-4x-upgrade-guide-4_22.adoc` covering both
new commands and the
`CAMEL_SELF_UPDATE_CHECK` toggle.
## Testing
Unit and integration tests added: `InstallDetectorTest`, `DoctorTest`,
`ManifestFetcherTest`,
`InstallScriptFetcherTest`, `UpdateCheckerTest`, `WebsiteInstallTest`,
`WebsiteManifestGeneratorTest`, and an end-to-end
`SelfUpdateIntegrationTest` for the delegation
flow. `assertj-core` declared as a test dependency in `camel-launcher`.
---
_AI-generated PR description by Claude Code on behalf of ammachado._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]