← Back to issue list

Strip "v" from git version

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1882892
Type
issue
State
closed
Author
~fo0bar
Labels
—
Created
Updated
Closed

Current evaluation

No default "v" stripping was added. A maintainer said version: git is deprecated and recommends custom version logic via snapcraftctl set-version.

Resolution: closed not a bug

Reason: The sole maintainer response identified the existing override-pull and snapcraftctl set-version mechanism as the intended solution. No resolving PR or commit was linked.

Evaluated by: mr-cal-bot

No scores available.

Issue body

"version: git" produces a version from `git describe`, producing "v4.4.1+git17.ab595c2". git's recommended tag format is to prefix tag versions with "v". I know snap versions don't convey any meaning, but most developers don't consider the "v" to be part of the version number in their software. I also know you can use snapcraftctl set-version within override-pull, but that seems like a heavy solution, though I've found many examples doing that specifically to strip the v (e.g. https://github.com/snapcrafters/wethr/blob/master/snap/snapcraft.yaml). Since it's a common use case, maybe strip the initial ^v by default, or maybe "version: git-numeric" or similar?

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug No default "v" stripping was added. A maintainer said version: git is deprecated and recommends custom version logic via snapcraftctl set-version.
stealth/space-bunny-alpha — closed not a bug Closed without a code change; maintainers said version: git is deprecated and version formatting can be customized with snapcraftctl set-version.
stealth/space-bunny-alpha — closed stale Closed without a documented fix or linked PR/commit; no matching implementation was found for stripping the v prefix from git-derived versions.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The suggestion to strip the "v" prefix from git version strings or add a "git-numeric" format was abandoned due to lack of discussion or implementation.
qwen/qwen3.6-35b-a3b — — Closed as abandoned without resolution or discussion. The request to strip the 'v' prefix from git describe output or add a 'git-numeric' version format was not implemented.
qwen/qwen3.6-35b-a3b — — Abandoned and closed without implementation. The proposal to automatically strip the leading v from git version strings or introduce a git-numeric format received no discussion or resolution.
qwen3.6-35b-a3b-mtp-q6 — — Abandoned. The request to automatically strip the 'v' prefix from git-derived versions or introduce a 'git-numeric' format was not addressed, leaving the default behavior unchanged.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1812633 "version: git" can produce version strings too long for snapd snapcraft (launchpad) closed Closed as superseded: version: git was deprecated in favor of craftctl set version after version-script was offered as the workaround for oversized git-derived versions.
72%