File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,12 @@ update_version_file() {
21
21
# Function to extract semver from git describe
22
22
extract_semver_from_describe () {
23
23
local describe_output=" $1 "
24
- # Extract version from patterns like :
24
+ # Extract version from tags ending with a semantic version, e.g. :
25
25
# feature_larasets_5.10.2-1-g97bdb34 -> 5.10.2-1-g97bdb34
26
- # feature_larasets_5.10.2 -> 5.10.2
27
- echo " $describe_output " | sed -E ' s/^[^_]*_[^_]*_([0-9]+\.[0-9]+\.[0-9]+.*)/\1/' | head -1
26
+ # release_5.10.2 -> 5.10.2
27
+ # v5.10.2 -> 5.10.2
28
+ # The regex matches any tag ending with X.Y.Z (optionally with suffixes).
29
+ echo " $describe_output " | sed -E ' s/.*[_v]([0-9]+\.[0-9]+\.[0-9]+([-a-zA-Z0-9\.]*)?)/\1/' | head -1
28
30
}
29
31
30
32
# Try GitVersion first (if available and working)
You can’t perform that action at this time.
0 commit comments