From 97e0151ba6a260195ced76ab69d3e3bd58ba68fc Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 23 Jun 2025 17:13:45 +0300 Subject: Initial gitsyncer implementation with version support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Initialize Go module for github.com/paul/gitsyncer - Add version package with version info (v0.1.0) - Implement main.go with --version flag support - Create comprehensive Taskfile.yaml for build automation - Add CLAUDE.md with project documentation The binary can be built with 'task' or 'go build -o gitsyncer ./cmd/gitsyncer' 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/version/version.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 internal/version/version.go (limited to 'internal') diff --git a/internal/version/version.go b/internal/version/version.go new file mode 100644 index 0000000..79661ce --- /dev/null +++ b/internal/version/version.go @@ -0,0 +1,31 @@ +package version + +import ( + "fmt" + "runtime" +) + +var ( + // Version is the current version of gitsyncer + Version = "0.1.0" + + // GitCommit is the git commit hash at build time + GitCommit = "unknown" + + // BuildDate is the date when the binary was built + BuildDate = "unknown" + + // GoVersion is the Go version used to build + GoVersion = runtime.Version() +) + +// GetVersion returns the full version string +func GetVersion() string { + return fmt.Sprintf("gitsyncer version %s (commit: %s, built: %s, go: %s)", + Version, GitCommit, BuildDate, GoVersion) +} + +// GetShortVersion returns just the version number +func GetShortVersion() string { + return Version +} \ No newline at end of file -- cgit v1.2.3