-
Notifications
You must be signed in to change notification settings - Fork 13
lakefileの中でgitタグを取得できる #2259
Copy link
Copy link
Open
Description
You can run arbitrary IO in a lakefile.lean via the run_io syntax. For example, you could derive the version of a package from a Git tag like so:
def getVersion : IO StdVer := do
let repo := GitRepo.mk __dir__
let some tag ← repo.findTag?
| return v!"0.0.0"
let .ok ver := StdVer.parse tag
| return v!"0.0.0"
return ver
package mypkg where
version := run_io getVersionReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels