tools: make repeated runs of oldv SAME_COMMIT -c "./v file.v", not use the network at all

This commit is contained in:
Delyan Angelov 2023-08-25 20:39:01 +03:00
parent 7028a9df83
commit 7add6e7d51
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -140,6 +140,11 @@ pub mut:
pub fn (mut vgit_context VGitContext) compile_oldv_if_needed() {
vgit_context.vexename = if os.user_os() == 'windows' { 'v.exe' } else { 'v' }
vgit_context.vexepath = os.real_path(os.join_path_single(vgit_context.path_v, vgit_context.vexename))
if os.is_dir(vgit_context.path_v) && os.is_executable(vgit_context.vexepath) {
// already compiled, no need to compile that specific v executable again
vgit_context.commit_v__hash = get_current_folder_commit_hash()
return
}
mut command_for_building_v_from_c_source := ''
mut command_for_selfbuilding := ''
if 'windows' == os.user_os() {