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

vup: do v self then make.bat on Windows (#6219)

This commit is contained in:
JalonSolov 2020-08-25 12:12:53 -04:00 committed by GitHub
parent cc82ed28f8
commit 45505a8423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,26 +42,24 @@ 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 {
vself = 'v.exe self'
make = 'make.bat'
app.backup('cmd/tools/vup.exe')
}
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 {
panic(err)
}
println(make_result.output)
app.backup('cmd/tools/vup.exe')
} $else {
self_result := os.exec('./v self') 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 {
panic(err)
}
println(make_result.output)
}
}
os.exec('v cmd/tools/vup.v') or {
panic(err)