Skip to content

Conversation

@N6REJ
Copy link
Collaborator

@N6REJ N6REJ commented Aug 20, 2025

User description

adds ability to have versions in an "/bin/archived" folder and still do a release.


PR Type

Enhancement


Description

  • Add support for archived bundle versions in /bin/archived/ folder

  • Enhance build system to check archived location during release

  • Improve error messaging for bundle version lookup


Diagram Walkthrough

flowchart LR
  A["Bundle Release Request"] --> B["Check /bin/ folder"]
  B --> C{Bundle Found?}
  C -->|Yes| D["Release Bundle"]
  C -->|No| E["Check /bin/archived/ folder"]
  E --> F{Bundle Found?}
  F -->|Yes| G["Release Archived Bundle"]
  F -->|No| H["Fail with Enhanced Error"]
Loading

File Walkthrough

Relevant files
Enhancement
build-bundle.xml
Enhanced bundle lookup with archived support                         

build/build-bundle.xml

  • Add new elseif condition to check /bin/archived/ directory
  • Include echo message for archived bundle detection
  • Update error message to mention both checked locations
+10/-1   

@N6REJ N6REJ added the enhancement ✨ Improve program label Aug 20, 2025
@qodo-code-review
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Cross-platform Paths

Backslashes are used in new archived checks and messages; verify this build runs on non-Windows agents or consider using path properties or forward slashes for Ant portability.

<available file="${project.basedir}\bin\archived\${bundle.name}${input.bundle}" type="dir"/>
<then>
  <echo message="Bundle version found in archived location: ${project.basedir}\bin\archived\${bundle.name}${input.bundle}"/>
  <antcall target="release.one">
    <param name="bundle.path" value="${project.basedir}\bin\archived\${bundle.name}${input.bundle}"/>
  </antcall>
</then>
Echo Noise

The new echo may clutter release logs; confirm desired verbosity or guard with a verbose/debug flag.

<echo message="Bundle version found in archived location: ${project.basedir}\bin\archived\${bundle.name}${input.bundle}"/>
<antcall target="release.one">
Error Message Clarity

The fail message states both locations were checked; ensure this remains accurate if future locations are added, and consider including the exact requested version string.

  <fail message="Invalid bundle's version for ${bundle.name}. Checked both /bin/ and /bin/archived/ locations."/>
</else>

@qodo-code-review
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Make file paths cross-platform

Use forward slashes in paths to ensure Ant resolves them cross-platform.
Backslashes can be interpreted as escape characters and break on non-Windows
environments.

build/build-bundle.xml [189-195]

-<available file="${project.basedir}\bin\archived\${bundle.name}${input.bundle}" type="dir"/>
+<available file="${project.basedir}/bin/archived/${bundle.name}${input.bundle}" type="dir"/>
 <then>
-  <echo message="Bundle version found in archived location: ${project.basedir}\bin\archived\${bundle.name}${input.bundle}"/>
+  <echo message="Bundle version found in archived location: ${project.basedir}/bin/archived/${bundle.name}${input.bundle}"/>
   <antcall target="release.one">
-    <param name="bundle.path" value="${project.basedir}\bin\archived\${bundle.name}${input.bundle}"/>
+    <param name="bundle.path" value="${project.basedir}/bin/archived/${bundle.name}${input.bundle}"/>
   </antcall>
 </then>
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that using forward slashes in Ant build file paths is a best practice for cross-platform compatibility, improving the robustness of the script.

Medium
General
Improve failure message detail

Include the resolved paths in the failure to aid debugging and ensure clarity on
what was checked. This avoids ambiguity when variables expand unexpectedly.

build/build-bundle.xml [198]

-<fail message="Invalid bundle's version for ${bundle.name}. Checked both /bin/ and /bin/archived/ locations."/>
+<fail message="Invalid bundle's version for ${bundle.name}. Checked: ${project.basedir}/bin/${bundle.name}${input.bundle} and ${project.basedir}/bin/archived/${bundle.name}${input.bundle}"/>
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: This is a good suggestion that improves debuggability by including the fully resolved paths in the failure message, making it easier to diagnose issues with variable expansion.

Low
  • More

@jwaisner jwaisner merged commit 2791b84 into main Aug 22, 2025
2 checks passed
@jwaisner jwaisner deleted the archived branch August 22, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ Improve program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants