forked from leanprover-community/lean-update
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.lean
More file actions
29 lines (27 loc) · 1.02 KB
/
Copy pathMain.lean
File metadata and controls
29 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module
import LeanUpdate.BumpPinnedDeps
import LeanUpdate.CheckChanges
import LeanUpdate.CreateIssue
import LeanUpdate.FindDep
import LeanUpdate.UpdateDependencies
import LeanUpdate.UpdateLeanToolchain
import LeanUpdate.PostUpdateValidation
public def main (args : List String) : IO Unit := do
match args with
| ["bumpPinnedTags"] => runBumpPinnedTags
| ["checkChanges"] => runCheckChanges
| ["createIssue"] => runCreateIssue
| ["findDependencies"] => runFindDependencies
| ["updateDependencies"] => runUpdateDependencies
| ["updateLeanToolchain"] => runUpdateLeanToolchain
| ["validateUpdate"] =>
let result ← runPostUpdateValidation
if let .error err := result.buildResult then
IO.eprintln err
if let some (.error err) := result.testResult? then
IO.eprintln err
if let some (.error err) := result.lintResult? then
IO.eprintln err
if result.isFailure then
throw <| IO.userError "post-update validation failed"
| _ => throw <| IO.userError "invalid arguments of leanUpdate"