Skip to content

Commit a58a01c

Browse files
committed
fix(build): match only semver tags in git_version()
Change --match pattern from "v*" to "v[0-9]*" so that git describe only considers semantic version tags (e.g. v0.0.28) and skips non-version tags like vm-dev. Closes #832
1 parent 355d845 commit a58a01c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎crates/openshell-core/build.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
6464
/// Returns `None` when git is unavailable or the repo has no matching tags.
6565
fn git_version() -> Option<String> {
6666
let output = std::process::Command::new("git")
67-
.args(["describe", "--tags", "--long", "--match", "v*"])
67+
.args(["describe", "--tags", "--long", "--match", "v[0-9]*"])
6868
.output()
6969
.ok()?;
7070

0 commit comments

Comments
 (0)