vup: do v self then make.bat on Windows (#6219)
parent
cc82ed28f8
commit
45505a8423
|
@ -42,27 +42,25 @@ fn main() {
|
|||
app.show_current_v_version()
|
||||
return
|
||||
}
|
||||
mut vself := 'v self'
|
||||
mut make := 'make'
|
||||
$if windows {
|
||||
app.backup('v.exe')
|
||||
make_result := os.exec('make.bat') or {
|
||||
panic(err)
|
||||
}
|
||||
println(make_result.output)
|
||||
vself = 'v.exe self'
|
||||
make = 'make.bat'
|
||||
app.backup('cmd/tools/vup.exe')
|
||||
} $else {
|
||||
self_result := os.exec('./v self') or {
|
||||
}
|
||||
self_result := os.exec(vself) or {
|
||||
panic(err)
|
||||
}
|
||||
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 {
|
||||
make_result := os.exec(make) or {
|
||||
panic(err)
|
||||
}
|
||||
println(make_result.output)
|
||||
}
|
||||
}
|
||||
os.exec('v cmd/tools/vup.v') or {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue