vup: run make only on breaking changes

pull/4884/head
Alexander Medvednikov 2020-05-13 15:15:37 +02:00
parent f866a8a8e2
commit c92b09d3e7
1 changed files with 10 additions and 2 deletions

View File

@ -43,10 +43,18 @@ fn main() {
backup('cmd/tools/vup.exe')
} $else {
make_result := os.exec('make') or {
self_result := os.exec('./v self') or {
panic(err)
}
println(make_result.output)
println(self_result.output)
if self_result.exit_code != 0 {
// v self failed, have to use make
println('v self failed, running make...')
make_result := os.exec('make') or {
panic(err)
}
println(make_result.output)
}
}
_ := os.exec('v cmd/tools/vup.v') or {