Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.63 KB

versioning-policy.md

File metadata and controls

47 lines (38 loc) · 1.63 KB

Versioning Policy

Hello CLI follows Semantic Versioning and prefixes releases with v. Examples: v0.1.1, v0.2.0, v1.0.0.

Development Builds

  • The binary defaults to reporting v0.0.0-dev when no specific version information is injected.
  • Builds produced from a git checkout that is not on a release tag will include the short commit hash, e.g. v0.0.0-dev.ab12cd3.
  • Dirty working trees append .dirty to the version string.

Release Builds

Before tagging, confirm your origin remote targets the canonical repository:

git remote -v
  1. Confirm the latest tag and choose the next SemVer increment (e.g. bump v0.1.0 → v0.1.1). Then create an annotated tag on the commit to be released:
    git fetch --tags
    git tag -a v0.1.1 -m "v0.1.1"
  2. Ensure build tooling injects that tag into the binary using:
    go build -ldflags "-X main.version=v0.1.1"
    GoReleaser is already configured (.goreleaser.yaml) to pass -X main.version=v{{ .Version }}; no extra action is required when running goreleaser release.
  3. The scripts/install.sh helper resolves the version automatically:
    • If HELLO_VERSION is set, its value is used.
    • Otherwise, builds from a tagged checkout use the tag, and non-tagged builds fall back to the v0.0.0-dev.<commit> format.

Windows Packaging

Winget manifests require numeric versions without the leading v. When preparing a release, strip the prefix before updating PackageVersion:

PackageVersion: 0.1.1

The release artifact and the CLI itself will continue to use the v-prefixed form.