From 977a625a45aad789614743a5d72725b58570aded Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 23 Feb 2021 10:05:59 +0200 Subject: [PATCH] tools: support `v -prod up` --- cmd/tools/vup.v | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/tools/vup.v b/cmd/tools/vup.v index 8f161aa08a..7ff83b8f69 100644 --- a/cmd/tools/vup.v +++ b/cmd/tools/vup.v @@ -7,6 +7,7 @@ import v.util.recompilation struct App { is_verbose bool + is_prod bool vexe string vroot string } @@ -16,6 +17,7 @@ fn new_app() App { vroot := os.dir(vexe) return App{ is_verbose: '-v' in os.args + is_prod: '-prod' in os.args vexe: vexe vroot: vroot } @@ -66,7 +68,8 @@ fn (app App) update_from_master() { fn (app App) recompile_v() { // NB: app.vexe is more reliable than just v (which may be a symlink) - vself := '"$app.vexe" self' + opts := if app.is_prod { '-prod' } else { '' } + vself := '"$app.vexe" $opts self' app.vprintln('> recompiling v itself with `$vself` ...') if self_result := os.exec(vself) { if self_result.exit_code == 0 {