From 09f388e2ff7088d896087202370207a4464ce1bd Mon Sep 17 00:00:00 2001 From: despiegk Date: Sun, 9 Mar 2025 15:59:57 +0100 Subject: [PATCH] ... --- cli/compile.vsh | 4 ++-- lib/develop/gittools/repository.v | 2 +- lib/develop/gittools/repository_info.v | 3 ++- lib/develop/gittools/repository_load.v | 3 +++ libarchive/installers/web/caddy2/caddy_model.v | 1 - 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cli/compile.vsh b/cli/compile.vsh index cf66f026..90608c80 100755 --- a/cli/compile.vsh +++ b/cli/compile.vsh @@ -1,5 +1,5 @@ -#!/usr/bin/env -S v -n -w -parallel-cc -enable-globals run -// #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run +#!/usr/bin/env -S v -n -cg -w -parallel-cc -enable-globals run +// #!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run import os import flag diff --git a/lib/develop/gittools/repository.v b/lib/develop/gittools/repository.v index 11844d9e..864a078c 100644 --- a/lib/develop/gittools/repository.v +++ b/lib/develop/gittools/repository.v @@ -49,7 +49,7 @@ pub mut: // GitRepoConfig holds repository-specific configuration options. pub struct GitRepoConfig { pub mut: - remote_check_period int = 3600 * 24 * 3 // Seconds to wait between remote checks (0 = check every time), default 3 days + remote_check_period int = 3600 * 24 * 7 // Seconds to wait between remote checks (0 = check every time), default 7 days } // just some initialization mechanism diff --git a/lib/develop/gittools/repository_info.v b/lib/develop/gittools/repository_info.v index fb735a92..e05575c7 100644 --- a/lib/develop/gittools/repository_info.v +++ b/lib/develop/gittools/repository_info.v @@ -83,7 +83,8 @@ pub fn (mut repo GitRepo) need_pull() !bool { // Therefore we need to pull return true } - return error('Failed to check merge-base: ${err}') + return true + // return error('Failed to check merge-base: ${err}') } // If we get here, the remote commit is in our history // Therefore we don't need to pull diff --git a/lib/develop/gittools/repository_load.v b/lib/develop/gittools/repository_load.v index bb4a5c72..ce692ff0 100644 --- a/lib/develop/gittools/repository_load.v +++ b/lib/develop/gittools/repository_load.v @@ -13,6 +13,9 @@ pub fn (mut repo GitRepo) status_update(args StatusUpdateArgs) ! { // Check current time vs last check, if needed (check period) then load repo.cache_get() or { return error('Failed to get cache for repo ${repo.name}: ${err}') } // Ensure we have the situation from redis repo.init() or { return error('Failed to initialize repo ${repo.name}: ${err}') } + if 'OFFLINE' !in os.environ() { + return + } current_time := int(time.now().unix()) if args.reload || repo.last_load == 0 || current_time - repo.last_load >= repo.config.remote_check_period { diff --git a/libarchive/installers/web/caddy2/caddy_model.v b/libarchive/installers/web/caddy2/caddy_model.v index 695bc18b..d3f704b9 100644 --- a/libarchive/installers/web/caddy2/caddy_model.v +++ b/libarchive/installers/web/caddy2/caddy_model.v @@ -30,7 +30,6 @@ fn obj_init(mycfg_ CaddyServer) !CaddyServer { // user needs to us switch to make sure we get the right object fn configure() ! { mut cfg := get()! - if !os.exists('/etc/caddy/Caddyfile') { // set the default caddyfile configure_examples(path: cfg.path)!