Skip to content

Updating grate code to account for multiple results - #1706

Merged
harrisonmeister merged 1 commit into
masterfrom
bug-grate
Sep 1, 2026
Merged

Updating grate code to account for multiple results#1706
harrisonmeister merged 1 commit into
masterfrom
bug-grate

Conversation

@twerthi

@twerthi twerthi commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Background

The latest version of Grate is including two grate.exe files within GitHub Asset download. When executing on Windows, this caused an error.

Results

When the user has selected the Download Grate option, this PR checks to see if multiple results were returned when searching for the executable and chooses the first one within the results.

Before

When choosing Download Grate option and running on Windows, multiple files were found which caused it to follow a code path that was meant for when the naming convention had net in the name. This resulted in no executable being selected which failed the template.

After

Added a different code path that checks for multiple results and chooses the first one in the array if it is encountered. The multiple files seem to only occur for Windows, but the code work for Linux as well. It is currently not packaging multile executables in the Linux version, so it was difficult to test.

Pre-requisites

  • Id should be a GUID that is not 00000000-0000-0000-0000-000000000000
    • NOTE If you are modifying an existing step template, please make sure that you do not modify the Id property (updating the Id will break the Library sync functionality in Octopus).
  • Version should be incremented, otherwise the integration with Octopus won't update the step template correctly
  • $Meta must have ExportedAt and OctopusVersion updated
  • Parameter names should not start with $
  • Step template parameter names (the ones declared in the JSON, not the script body) should be prefixed with a namespace so that they are less likely to clash with other user-defined variables in Octopus (see this issue). For example, use an abbreviated name of the step template or the category of the step template).
  • LastModifiedBy field must be present, and (optionally) updated with the correct author
  • The best practices documented here have been applied
  • If a new Category has been created:
    • An image with the name {categoryname}.png must be present under the step-templates/logos folder
    • The switch in the humanize function in gulpfile.babel.js must have a case statement corresponding to it

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review this PR in Hyponome for a side-by-side diff of the step-template JSON and any embedded scripts.

@harrisonmeister harrisonmeister left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harrisonmeister
harrisonmeister merged commit 5952413 into master Sep 1, 2026
4 checks passed
@harrisonmeister
harrisonmeister deleted the bug-grate branch September 1, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants