nimi-python icon indicating copy to clipboard operation
nimi-python copied to clipboard

Fix check_latest_release shell script

Open ni-jfitzger opened this issue 8 months ago • 1 comments

  • [X] This contribution adheres to CONTRIBUTING.md.
  • ~[ ] I've updated CHANGELOG.md if applicable.~
  • ~[ ] I've added tests applicable for this pull request~

What does this Pull Request accomplish?

Fixes the check_latest_release workflow (hopefully).

There were several major issues with the script that I found:

  • PowerShell is the default shell type, but the script was written in Bash
  • github.event_name, etc. can't be accessed the same way in the script as they can in step arguments
    • Also, release.tag_name needs to be parsed from a JSON file, manually, to access it within the script
    • There's supposed to be an INPUT_RELEASE_TAG variable created for us to access the input when manually triggering, but it wasn't there in the environment variables, so we have to get it from the JSON file, too.
  • Though the &&, || worked in the step argument where it was originally used, it does not work within the shell script. We need an if, else

List issues fixed by this Pull Request below, if any.

  • Fix #2117

What testing has been done?

After realizing I couldn't trigger a manual run of the workflow against my fork branch, I created a branch with the same changes in this repo and ran the workflow against it.

It succeeded. I don't know if this will fix the issue of the release tag not automatically triggering the workflow, but we can test that after this goes in.

ni-jfitzger avatar Jul 09 '25 02:07 ni-jfitzger