From e5623022be9e946bbc061f04670576d92d56a72c Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Tue, 7 Jul 2026 14:47:12 +0530 Subject: [PATCH] feat: add VERSION file and root version.go with //go:embed VERSION as single source of truth --- VERSION | 1 + version.go | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 VERSION create mode 100644 version.go diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1.0 diff --git a/version.go b/version.go new file mode 100644 index 0000000..a950ed1 --- /dev/null +++ b/version.go @@ -0,0 +1,15 @@ +// Package contracts provides cross-repo type contracts for hawk-eco. +// +// The Version variable is sourced from the VERSION file at the repo root. +package contracts + +import ( + _ "embed" + "strings" +) + +//go:embed VERSION +var versionFile string + +// Version of the hawk-core-contracts library. Single source of truth: VERSION file. +var Version = strings.TrimSpace(versionFile)