davsclaus opened a new pull request, #29915: URL: https://github.com/apache/camel/pull/29915
Item 9 of [CAMEL-26933](https://issues.apache.org/jira/browse/CAMEL-26933). ## Problem - **`camel.bat` ships with LF line endings.** `.gitattributes` has no entry for it, and `launcher-content.xml` sets no line ending. cmd.exe can miss `goto` and `call :label` targets in a batch file with LF endings when a line crosses a 512-byte block, and the 7.4 KB script has many labels. The Windows tests run on a checkout where autocrlf may convert the file, so they do not see what users get. The launcher ZIP and tarball from main: `camel.bat` is "DOS batch file text" with LF only. - **`:tryJavaParseVersion` rejects an early-access JDK such as `26-ea`.** It splits the version on dots only, so the major is `26-ea`, which is not a number. `camel.sh` reads `26-ea` as 26. ## Change - **`launcher-content.xml`** (used by the public ZIP, the WinGet ZIP and the tarball) has a file set of its own for `camel.bat` with `<lineEnding>dos</lineEnding>`, and `camel.sh` gets `<lineEnding>unix</lineEnding>`. The distributions get the right endings whatever the checkout has. - **`camel.bat`** splits the version on `.`, `-` and `+`. So `21.0.5`, `26-ea` and `21+35` give 21, 26 and 21, as `camel.sh` reads them. A major that is still not a number is rejected as before, and `17-ea` is now 17, which is below the minimum, so the next candidate is used as before. ## Tests - **`LauncherArchiveLayoutIT`:** a new check that `bin/camel.bat` of each ZIP has CRLF on every line and `bin/camel.sh` has no CR. It runs in the launcher workflow (`verify -Dcamel.exe.build=true`). - **`CamelBatDiscoveryTest`** (Windows): a `26-ea` JDK is accepted. `rejectsNonnumericMajorAndContinuesToFallback` (17-ea) still passes, as 17 is below the minimum. - **The distribution built from this branch:** `camel.bat` in the ZIP and the tarball is "with CRLF line terminators" (200 CRLF, 0 bare LF), and `camel.sh` is unchanged. - **camel-launcher:** 414 tests pass (47 skipped: the Windows-only and the exe-build ones). _Claude Code on behalf of davsclaus_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
