luxtorpeda-dev/packages

env.json as alternative to shell script variables

Closed this issue · 1 comments

Allow for a env.json to be created that provides the same details as env.sh, but with the git tag in the json file. Ones that use this and follow releases should have a COMMIT_TAG variable, other wise should have a COMMIT_REF for ignoring release checks (for the ones that don't have recent releases). This will be useful to create a action later that checks this and creates pull requests automatically for new engine version changes.

The setup layer should detect that this file exists and if so, ignore env.sh (it shouldn't be there in that case) and use jq to export env variables, as well as either git checkout in the setup, or update the build.sh to use it accordingly.

  • Update documentation about the env.json approach
  • Update all games that have releases recently with env.json
  • For ones that have newer releases, find the release that matches the current hash and use it instead (the new workflow should catch these and trigger a PR
  • For ones that don't have releases, don't match, then use commit-hash
  • Then add workflow that runs and checks this; workflow should double-check with apis that the tag makes sense; only use commit_tag engines, not hash; should take into account tags and releases
  • Maybe weekly check for ones with commit_hash to see if there's a newer one?

https://github.com/marketplace/actions/create-pull-request
https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release

Create PRs that update package json and new env json with the latest stuff. As well, switch to using github releases as changelog (make that note in the changelog.md)

Could also look into a trigger for a new PR, in terms of giving it an engine and a commit hash, and it could create a PR, for when I'd want to update to a newer commit, where there's no releases.