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