From c92b09d3e71a17c68f1d409dd0cd465439c27154 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 13 May 2020 15:15:37 +0200 Subject: [PATCH] vup: run make only on breaking changes --- cmd/tools/vup.v | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmd/tools/vup.v b/cmd/tools/vup.v index 899865ec37..6b36a29a47 100644 --- a/cmd/tools/vup.v +++ b/cmd/tools/vup.v @@ -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 {