Skip to content

Commit 2583605

Browse files
authored
Merge pull request #184 from CanOfBees/update-basex-version-check
Update BaseX version check to include beta releases.
2 parents 0a620c0 + fce3dfb commit 2583605

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/plugin-basex/main/resources/queries/basex

src/plugin-basex/main/resources/queries/basex/version.xq

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ let $info := db:system()
2323
return if ($info instance of element(system)) then (: BaseX >= 7.1 :)
2424
(: NOTE: The element containing the version may be localized, so look for version-like strings. :)
2525
for $text in $info//*/text()
26-
where fn:matches($text, "^([789]|[1-9][0-9]+)\.[0-9]+(\.[0-9]+)?( [a-z]+)?$")
26+
(: pattern matches 12.1, 12.1.1, 12.1.1 beta, or 12.1.1. beta eee7a3q :)
27+
where fn:matches($text, "^([789]|[1-9][0-9]+)(\.[0-9])+(\.[0-9]+)?( [a-z]+)?( [a-z0-9]+)?$")
2728
return $text
2829
else (: BaseX == 7.0 :)
2930
for $line in fn:tokenize($info, "(\r\n?|\n)")

0 commit comments

Comments
 (0)