From 48271bc6fb1e5aba7355da8c6fafba31374b1adc Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 26 May 2026 13:50:20 +0300 Subject: [PATCH] build time --- gitly.v | 14 +++++++++----- templates/layout/footer.html | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gitly.v b/gitly.v index fedd446..d8eb1d4 100644 --- a/gitly.v +++ b/gitly.v @@ -28,11 +28,12 @@ pub struct App { pub mut: db GitlyDb mut: - version string - logger log.Log - config config.Config - settings Settings - port int + version string + build_time string + logger log.Log + config config.Config + settings Settings + port int } pub struct Context { @@ -90,6 +91,9 @@ fn new_app() !&App { app.version = version + build_unix := os.file_last_mod_unix(os.executable()) + app.build_time = time.unix(build_unix).format() + app.handle_static('static', true)! app.serve_static('/favicon.ico', 'static/assets/favicon.svg')! if !os.exists('avatars') { diff --git a/templates/layout/footer.html b/templates/layout/footer.html index 7dd8d43..0a2affc 100644 --- a/templates/layout/footer.html +++ b/templates/layout/footer.html @@ -3,6 +3,7 @@ Powered by gitly.org Written in V. Page generated in @{ctx.page_gen_time()}. +Built @{app.build_time}.
Source code: github.com/vlang/gitly
-- 2.39.5