CAMEL-23703: camel-launcher - fix brew audit --strict redundant version - #25509
CAMEL-23703: camel-launcher - fix brew audit --strict redundant version#25509ammachado wants to merge 1 commit into
Conversation
Homebrew's brew audit --strict rejects a formula's `version` field when it merely duplicates the version brew already scans from the `url` field. formula.rb.tpl set both, so any real submission of the generated formula to homebrew-core would fail that gate. Removed the redundant `version` line. camel-validate.sh's homebrew version check previously read the expected post-install version from that same `version` field, so removing it regressed the check. It now reads the version out of the formula's own `url` before Step 2 rewrites that url to a local file:// path for the offline test-mode install. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 2 tested, 0 compile-only — current: 1 all testedMaveniverse Scalpel detected 2 affected modules (current approach: 1).
|
Description
formula.rb.tpl(the Homebrew formula template rendered by JReleaser forcamel-launcher) set both aurland an explicitversionfield. Homebrew'sbrew audit --strictflags an explicitversionas redundant whenever it can already be inferred by scanning theurl(which it can here, since the URL embeds the Maven coordinate version). Any real submission of the generated formula tohomebrew-corewould fail this audit gate.Fix: drop the redundant
versionline from the template.camel-validate.sh's Homebrew validation step previously read the expected post-install version back out of that sameversionfield (needed because in CI's test-mode staging the formula's real POM version, e.g. a-SNAPSHOT, differs from the release-manager-facing resolved version). Removing the field regressed that check, so it now reads the expected version out of the formula'surlinstead, captured before the test-mode step rewrites thaturlto a localfile://path for the offline install.Found and fixed while running
camel-package.sh prepare+camel-validate.sh allfor the already-releasedcamel-4.22.0version to verify the launcher's JReleaser release procedure end-to-end.Verified locally: re-ran
camel-package.sh prepare --channel stable+camel-validate.sh allin the project's ownCAMEL_PACKAGE_TEST_MODE(the same mechanism.github/workflows/package-native-validation.ymluses in CI) —brew audit --strictnow reports no offenses, and the post-install version check passes.Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.This change only touches a shell script and a Mustache template (no Java sources), so the Maven formatter/impsort step has nothing to reformat; the pre-push hook's
mvn formatter:format impsort:sortran clean with no changes. A full root build was not run given the change's scope.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.Claude Code (Sonnet 5) on behalf of Adriano Machado (@ammachado)