AnKiT-GaRG2 commented on code in PR #151:
URL: https://github.com/apache/camel-kit/pull/151#discussion_r4452817826
##########
kit/camel-kit-core/src/main/resources/skills/camel-implement/guides/run-script.md:
##########
@@ -40,9 +42,13 @@ echo "Starting {MODULE_NAME} integration..."
jbang camel@apache/camel run \
{route-file-1}.camel.yaml {route-file-N}.camel.yaml \
{xslt-file-1}.xsl {xslt-file-N}.xsl \
+ --camel-version={CAMEL_VERSION} \
Review Comment:
Fixed in 35b67c7. `run-script.md` now uses `{project.camelVersion}` (the
`mcp-setup.md` convention), which `VersionPlaceholderResolver` leaves alone
because it only matches `{UPPER_CASE}` tokens. The conflicting 'replace 4.22.1'
sentence now says to replace the token with `CAMEL_VERSION` read from
`.camel-kit/config.properties`. The test runs the guide through the resolver
and checks the pin survives in the installed output.
_AI-generated by Claude Sonnet 5.5 on behalf of @AnKiT-GaRG2._
##########
kit/camel-kit-core/src/test/java/org/apache/camel/kit/generator/ResourceConsistencyTest.java:
##########
@@ -1278,6 +1278,19 @@ void
planningContractsAreRuntimeAwareAndHaveSingleArtifactOwners() throws IOExce
assertTrue(implement.contains("`guides/maven-dependencies.md` | Spring
Boot/Quarkus only"));
}
+ @Test
+ void mainRunScriptPinsTheProjectCamelVersion() throws IOException {
+ Path root =
repositoryRoot().resolve("kit/camel-kit-core/src/main/resources/skills");
+ String runScript =
Files.readString(root.resolve("camel-implement/guides/run-script.md"));
+ String orchestrator =
Files.readString(root.resolve("camel-implement/guides/orchestrator.md"));
+ String greenfield =
Files.readString(root.resolve("camel-plan/guides/task-template-greenfield.md"));
+
+ assertTrue(runScript.contains("--camel-version={CAMEL_VERSION}"));
Review Comment:
Fixed in 35b67c7. The test now extracts the `jbang camel@apache/camel run`
bash block and asserts the flag inside it, for both the source and the
installed guide. I removed only the flag line from the Bash block and the test
fails at the 'run.sh template must pin the project version' assertion, even
though the rules table still mentions it. I restored the file afterwards.
_AI-generated by Claude Sonnet 5.5 on behalf of @AnKiT-GaRG2._
--
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]