Skip to content

refactor: consolidate version packages #24

@rianjs

Description

@rianjs

Summary

Create a shared version package with consistent naming for build information.

Current State

cfl (tools/cfl/internal/version/version.go - 9 lines):

var (
    Version = "dev"
    Commit  = "none"
    Date    = "unknown"
)

jtk (tools/jtk/internal/version/version.go - 19 lines):

var (
    Version   = "dev"
    Commit    = "none"
    BuildDate = "unknown"  // Different name!
)

func Full() string { ... }
func Short() string { ... }

Proposed Changes

  1. Create shared/version/version.go with standardized variable names
  2. Include helper functions (Full(), Short()) from jtk
  3. Update ldflags in both tools' build configs to use consistent names
  4. Delete tool-specific version packages

Standardized Names

var (
    Version   = "dev"
    Commit    = "none"
    BuildDate = "unknown"
)

Impact

~25 lines consolidated, consistent version output across tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions