ci: vfmt cmd/tools/vpm.v
parent
156aa661ee
commit
36cb552918
|
@ -376,7 +376,7 @@ fn vpm_update(m []string) {
|
||||||
}
|
}
|
||||||
mut errors := 0
|
mut errors := 0
|
||||||
for modulename in module_names {
|
for modulename in module_names {
|
||||||
zname := url_to_module_name( modulename )
|
zname := url_to_module_name(modulename)
|
||||||
final_module_path := valid_final_path_of_existing_module(modulename) or { continue }
|
final_module_path := valid_final_path_of_existing_module(modulename) or { continue }
|
||||||
os.chdir(final_module_path) or {}
|
os.chdir(final_module_path) or {}
|
||||||
println('Updating module "$zname" in "$final_module_path" ...')
|
println('Updating module "$zname" in "$final_module_path" ...')
|
||||||
|
@ -581,11 +581,11 @@ fn mod_name_info(mod_name string) ModNameInfo {
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
fn url_to_module_name( modulename string ) string {
|
fn url_to_module_name(modulename string) string {
|
||||||
mut res := if mod := get_mod_by_url(modulename) { mod.name } else { modulename }
|
mut res := if mod := get_mod_by_url(modulename) { mod.name } else { modulename }
|
||||||
if res.ends_with('.git') {
|
if res.ends_with('.git') {
|
||||||
res = res.replace('.git', '')
|
res = res.replace('.git', '')
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue