From 3feffc0f77c5c525be15981791d948dc65784297 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sun, 3 Aug 2025 15:41:16 +0300 Subject: Directly embedding version inside the app instead of injecting it at build time, so there is always only one source of truth --- embeds/VERSION | 1 + embeds/embeds.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 embeds/VERSION (limited to 'embeds') diff --git a/embeds/VERSION b/embeds/VERSION new file mode 100644 index 0000000..3527dbc --- /dev/null +++ b/embeds/VERSION @@ -0,0 +1 @@ +v0.0.11 diff --git a/embeds/embeds.go b/embeds/embeds.go index 2cf0dcc..8bb7787 100644 --- a/embeds/embeds.go +++ b/embeds/embeds.go @@ -21,8 +21,10 @@ import ( "sync/atomic" ) +//go:embed VERSION +var Version string + var ( - Version string = "unknown" Commit string = "unknown" BuildDate string = "unknown" ) -- cgit v1.3.1