os: deprecate os.exec (returning ?os.Result), in favour of os.execute, which returns os.Result (#8974)

This commit is contained in:
Delyan Angelov 2021-03-08 20:52:13 +02:00 committed by GitHub
parent 10c9f61d61
commit d7049ae2da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 423 additions and 344 deletions

View file

@ -17,20 +17,22 @@ fn main() {
return
}
for {
os.exec('git pull --rebase') or {
res_pull := os.execute('git pull --rebase')
if res_pull.exit_code != 0 {
println('failed to git pull. uncommitted changes?')
return
}
// println('running fast')
resp := os.exec('./fast') or {
println(err)
resp := os.execute('./fast')
if resp.exit_code < 0 {
println(resp.output)
return
}
if resp.exit_code != 0 {
println('resp != 0, skipping')
} else {
os.chdir('website')
os.exec('git checkout gh-pages') ?
os.execute_or_panic('git checkout gh-pages')
os.cp('../index.html', 'index.html') ?
os.system('git commit -am "update benchmark"')
os.system('git push origin gh-pages')