1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vup: run make only on breaking changes

This commit is contained in:
Alexander Medvednikov 2020-05-13 15:15:37 +02:00
parent f866a8a8e2
commit c92b09d3e7

View File

@ -43,10 +43,18 @@ fn main() {
backup('cmd/tools/vup.exe') backup('cmd/tools/vup.exe')
} $else { } $else {
make_result := os.exec('make') or { self_result := os.exec('./v self') or {
panic(err) 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 { _ := os.exec('v cmd/tools/vup.v') or {