cmd: fix building gen_vc.v and vcreate.v by `v build-tools`
parent
69d3c3f596
commit
1d24fecc1b
|
@ -1,3 +1,5 @@
|
|||
module main
|
||||
|
||||
// This tool regenerates V's bootstrap .c files
|
||||
// every time the V master branch is updated.
|
||||
|
||||
|
@ -14,8 +16,6 @@
|
|||
// --dry-run dont push anything to remote repo
|
||||
// --force force update even if already up to date
|
||||
|
||||
module main
|
||||
|
||||
import os
|
||||
import log
|
||||
import flag
|
||||
|
@ -129,9 +129,8 @@ fn main() {
|
|||
// webhook server mode
|
||||
if flag_options.serve {
|
||||
vweb.run<WebhookServer>(flag_options.port)
|
||||
}
|
||||
} else {
|
||||
// cmd mode
|
||||
else {
|
||||
mut gen_vc := new_gen_vc(flag_options)
|
||||
gen_vc.init()
|
||||
gen_vc.generate()
|
||||
|
@ -164,6 +163,10 @@ pub fn (mut ws WebhookServer) init() {
|
|||
//ws.init_once()
|
||||
}
|
||||
|
||||
pub fn (mut ws WebhookServer) index() {
|
||||
eprintln('WebhookServer.index() called')
|
||||
}
|
||||
|
||||
// gen webhook
|
||||
pub fn (mut ws WebhookServer) genhook() {
|
||||
// request data
|
||||
|
|
|
@ -7,10 +7,7 @@ import v.util
|
|||
fn main() {
|
||||
args := os.args
|
||||
args_string := args[1..].join(' ')
|
||||
// TODO: fix cmd/tools/gen_vc.v / vweb too
|
||||
skips := [
|
||||
'cmd/tools/gen_vc.v'
|
||||
]
|
||||
skips := []string{}
|
||||
util.ensure_modules_for_all_tools_are_installed('-v' in args)
|
||||
if testing.v_build_failing_skipped(args_string.all_before('build-tools'), 'cmd/tools', skips) {
|
||||
exit(1)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
module main
|
||||
|
||||
// Copyright (c) 2019-2020 Alexander Medvednikov. All rights reserved.
|
||||
// Use of this source code is governed by an MIT license
|
||||
// that can be found in the LICENSE file.
|
||||
|
@ -6,7 +8,6 @@
|
|||
// structure of the program in the _current_ directory, while `new`
|
||||
// makes the program structure in a _sub_ directory. Besides that, the
|
||||
// functionality is essentially the same.
|
||||
module main
|
||||
|
||||
import os
|
||||
|
||||
|
|
Loading…
Reference in New Issue