Skip to content

Implement centralized version management system#40

Merged
pardeike merged 3 commits intomainfrom
copilot/fix-39
Sep 14, 2025
Merged

Implement centralized version management system#40
pardeike merged 3 commits intomainfrom
copilot/fix-39

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 14, 2025

Previously, the version "0.1.0" was hardcoded in multiple locations throughout the codebase, making it difficult to maintain and update for releases. This PR consolidates all version management into a single, centralized system.

Changes Made

Created centralized version package (internal/version/version.go):

  • Single source of truth for all version information
  • Support for build-time version injection via -ldflags
  • Helper functions for accessing version, commit, and build date

Updated all modules to use centralized version:

  • cmd/gabs/main.go - Main application version display
  • internal/gabp/client.go - GABP client handshake version
  • internal/mcp/stdio_server.go - MCP server initialization
  • internal/mcp/http_server.go - HTTP health endpoint and SSE connections

Added build tooling:

  • Makefile with proper version injection using git information
  • Support for multi-platform builds
  • Updated README.md with build instructions

Usage Examples

# Simple build (uses default version)
go build ./cmd/gabs

# Build with automatic git version info (recommended)
make build

# Build with custom version
go build -ldflags "-X github.com/pardeike/gabs/internal/version.Version=v1.0.0" ./cmd/gabs

The system automatically detects git commit information when available:

$ make build && ./gabs version
gabs 61f9f50-dirty (61f9f50c4be252776ab9d9ebe6a654814e4344b8)

This eliminates the need to manually update version strings in multiple files and provides a foundation for automated release builds.

Fixes #39.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Copilot AI and others added 2 commits September 14, 2025 17:05
Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>
Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>
Copilot AI changed the title [WIP] Version management Implement centralized version management system Sep 14, 2025
Copilot AI requested a review from pardeike September 14, 2025 17:07
@pardeike pardeike marked this pull request as ready for review September 14, 2025 17:51
@pardeike pardeike merged commit 94ba4ac into main Sep 14, 2025
2 checks passed
@pardeike pardeike deleted the copilot/fix-39 branch September 14, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version management

3 participants