gnodet commented on code in PR #24915:
URL: https://github.com/apache/camel/pull/24915#discussion_r3612390701


##########
dsl/camel-jbang/camel-launcher/src/test/java/org/apache/camel/dsl/jbang/launcher/PackagePlanTest.java:
##########
@@ -0,0 +1,857 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.launcher;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.MessageDigest;
+import java.util.*;

Review Comment:
   [Nit] Wildcard import — the project's `impsort:sort` plugin typically 
enforces explicit imports. Running `mvn impsort:sort` in the launcher module 
should expand this to the individual `java.util` classes actually used.
   
   _Claude Code on behalf of gnodet — AI-generated review_



##########
etc/scripts/release-distro.sh:
##########
@@ -55,6 +84,34 @@ for file in *.pom *.tar.gz *.zip; do
   [ -f "${file}" ] && sha512sum "${file}" > "${file}.sha512"
 done
 
+if [ -n "${WINGET_CANDIDATE}" ]; then
+  WINGET_NAME="camel-launcher-${VERSION}-winget-bin.zip"
+  WINGET_RC_URL="${DIST_DEV_REPO}/${VERSION}-rc${WINGET_CANDIDATE}"
+  for suffix in "" ".asc" ".sha512"; do
+    if ! svn export "${WINGET_RC_URL}/${WINGET_NAME}${suffix}" \
+        "${DOWNLOAD_LOCATION}/${WINGET_NAME}${suffix}"; then
+      echo "Error: could not export approved WinGet candidate file 
${WINGET_NAME}${suffix}."
+      exit 1
+    fi
+  done
+  ACTUAL_SHA512=$(sha512sum "${WINGET_NAME}" | awk '{print $1}')
+  if [ "$(echo "${ACTUAL_SHA512}" | tr 'A-Z' 'a-z')" != "$(echo 
"${WINGET_SHA512}" | tr 'A-Z' 'a-z')" ]; then

Review Comment:
   [Positive] The case-insensitive hex comparison here is a nice touch — it 
prevents a mismatch when the vote email carried uppercase hex and `sha512sum` 
outputs lowercase (or vice versa). The overall three-layer verification (vote 
digest → .sha512 self-check → GPG signature) is the strongest part of this PR 
iteration.
   
   _Claude Code on behalf of gnodet — AI-generated review_



##########
dsl/camel-jbang/camel-launcher/src/jreleaser/distributions/camel-cli/winget/installer.yaml.tpl:
##########
@@ -0,0 +1,93 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# {{jreleaserCreationStamp}}
+# yaml-language-server: 
$schema=https://aka.ms/winget-manifest.installer.1.12.0.schema.json
+#
+# Overrides the default JReleaser java-binary/winget template (which declares 
a single
+# Architecture: neutral entry) to declare per-architecture installers for x64 
and arm64.
+# The dedicated WinGet distribution zip ships both camel-x64.exe and 
camel-arm64.exe in
+# bin/ (see src/main/assembly/winget-bin.xml), so each architecture entry 
selects the correct
+# native exe via NestedInstallerFiles/RelativeFilePath. WinGet keeps the 
complete extracted
+# archive; NestedInstallerFiles selects the file exposed through the portable 
camel.exe alias.
+
+PackageIdentifier: {{wingetPackageIdentifier}}
+PackageVersion: {{wingetPackageVersion}}
+ReleaseDate: {{wingetReleaseDate}}
+Installers:
+  - Architecture: x64
+    InstallerUrl: {{{distributionUrl}}}
+    InstallerSha256: {{distributionChecksumSha256}}
+    InstallerType: zip
+    NestedInstallerType: portable
+    NestedInstallerFiles:
+      - RelativeFilePath: 
{{distributionArtifactRootEntryName}}\bin\camel-x64.exe
+        PortableCommandAlias: camel
+    {{#wingetHasDependencies}}
+    Dependencies:
+      {{#wingetHasWindowsFeatures}}
+      WindowsFeatures:
+        {{#wingetWindowsFeatures}}- {{.}}{{/wingetWindowsFeatures}}
+      {{/wingetHasWindowsFeatures}}
+      {{#wingetHasWindowsLibraries}}
+      WindowsLibraries:
+        {{#wingetWindowsLibraries}}- {{.}}{{/wingetWindowsLibraries}}
+      {{/wingetHasWindowsLibraries}}
+      {{#wingetHasExternalDependencies}}
+      ExternalDependencies:
+        {{#wingetExternalDependencies}}- {{.}}{{/wingetExternalDependencies}}
+      {{/wingetHasExternalDependencies}}
+      {{#wingetHasPackageDependencies}}
+      PackageDependencies:
+        {{#wingetPackageDependencies}}
+        - PackageIdentifier: {{packageIdentifier}}
+          {{#minimumVersion}}MinimumVersion: {{.}}{{/minimumVersion}}
+        {{/wingetPackageDependencies}}
+      {{/wingetHasPackageDependencies}}
+    {{/wingetHasDependencies}}
+  - Architecture: arm64
+    InstallerUrl: {{{distributionUrl}}}
+    InstallerSha256: {{distributionChecksumSha256}}
+    InstallerType: zip
+    NestedInstallerType: portable
+    NestedInstallerFiles:
+      - RelativeFilePath: 
{{distributionArtifactRootEntryName}}\bin\camel-arm64.exe
+        PortableCommandAlias: camel
+    {{#wingetHasDependencies}}
+    Dependencies:
+      {{#wingetHasWindowsFeatures}}
+      WindowsFeatures:
+        {{#wingetWindowsFeatures}}- {{.}}{{/wingetWindowsFeatures}}
+      {{/wingetHasWindowsFeatures}}
+      {{#wingetHasWindowsLibraries}}
+      WindowsLibraries:
+        {{#wingetWindowsLibraries}}- {{.}}{{/wingetWindowsLibraries}}
+      {{/wingetHasWindowsLibraries}}
+      {{#wingetHasExternalDependencies}}
+      ExternalDependencies:
+        {{#wingetExternalDependencies}}- {{.}}{{/wingetExternalDependencies}}
+      {{/wingetHasExternalDependencies}}
+      {{#wingetHasPackageDependencies}}
+      PackageDependencies:
+        {{#wingetPackageDependencies}}
+        - PackageIdentifier: {{packageIdentifier}}
+          {{#minimumVersion}}MinimumVersion: {{.}}{{/minimumVersion}}
+        {{/wingetPackageDependencies}}
+      {{/wingetHasPackageDependencies}}
+    {{/wingetHasDependencies}}
+ManifestType: installer
+ManifestVersion: 1.12.0

Review Comment:
   [Question] `ManifestVersion: 1.12.0` — the test 
`wingetManifestTemplatesUseTheSameCurrentSchemaVersion` ensures all three 
WinGet templates agree on this version, which is the key invariant. Has this 
schema version been verified against what the `microsoft/winget-pkgs` community 
repository currently accepts? WinGet manifest validation can reject manifests 
with schema versions newer than what `winget validate` supports on the target 
infrastructure.
   
   _Claude Code on behalf of gnodet — AI-generated review_



##########
pom.xml:
##########
@@ -749,6 +757,13 @@
             </activation>
             <properties>
                 <skipTests>true</skipTests>
+                <!--
+                    Read by plugin configuration only. Setting it here does 
NOT activate the
+                    profiles keyed on camel.exe.build; those need it as a user 
property, which
+                    maven-release-plugin's <arguments> passes explicitly. A 
build invoked as
+                    'mvn -Prelease' by hand must also pass 
-Dcamel.exe.build=true to get the
+                    native Windows executables.

Review Comment:
   [Positive] The documentation here is valuable — it clearly explains *why* 
`camel.exe.build` set as a `<properties>` entry in the release profile cannot 
activate the profiles that depend on it (Maven's property activator only reads 
user and system properties), which is a subtle Maven behavior that would 
otherwise be discovered by trial and error during a real release.
   
   _Claude Code on behalf of gnodet — AI-generated review_



-- 
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]

Reply via email to