oliver-butterley / lean-update

The action attempts to update Lean and Mathlib. If an update is available then the updated version is tested. This allows for automatic committing of the updated project, opening PRs or opening issues.
MIT License
6 stars 2 forks source link

update how to get latest release #32

Closed Seasawher closed 2 months ago

Seasawher commented 3 months ago

resolve #26

This PR is tested at mk-exercise: https://github.com/Seasawher/mk-exercise

Seasawher commented 3 months ago

I have made a tool to sort semvar in Lean. see Seasawher/Semver.lean.

Seasawher commented 3 months ago

scripts/getLatest.ps1 has a following job:

  1. download the list of all releases via gh command
  2. create a file with content of step 1
  3. download the binary of Seasawher/semver via gh command
  4. run semver.exe to update lean-toolchain
  5. remove temporary files

This is a bit compicated, so simplification may be required. If the process of sorting can be achieved as a PowerShell script, that might be better.

How do you think?

kim-em commented 3 months ago

I don't understand why an executables are involved. This should look like a Semver type, with appropriate functions to and from strings, and LE and LT instances.

oliver-butterley commented 3 months ago

Thanks @Seasawher for putting together a working version of this idea. I'm not completely comfortable with this solution, rather like you write in your own comment. We should aim for a much cleaner solution. I see two main possibilities:

Seasawher commented 3 months ago

Redo the entire action as javascript/node. This then allows the standard semver library to be used.

This sounds nice