Skip to content

Commit

Permalink
Semver thingy did not work
Browse files Browse the repository at this point in the history
  • Loading branch information
albbas committed Sep 14, 2024
1 parent c10744a commit c6e79bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .gut/delta.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
template = "https://github.com/giellalt/template-lang-und"
rev_id = 189
template_sha = "5438107cc3b01d0ca6a436cc819b493886913aea"
rev_id = 188
template_sha = "039269192c86bc4e92e4de05023c97b6fa16b3e5"

[replacements]
__REPO__ = "lang-kpv"
Expand Down
21 changes: 3 additions & 18 deletions m4/giella-macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ AS_IF([test "x$enable_grammarchecker" != "xno"],
then: pipx install git+https://github.com/divvun/giellaltgramtools
])]),
AC_MSG_RESULT(yes))
_gtgramtool_min_version=1.0.1
_gtgramtool_min_version=0.7.0
gtgramtool_too_old_message="gtgramtool needs to be updated.
If you installed it with pipx, run:
pipx upgrade GiellaLTGramTools"
Expand All @@ -683,25 +683,10 @@ AS_IF([test "x${GTGRAMTOOL}" != xno],
[_gtgramtool_version=$( "${GTGRAMTOOL}" --version | sed -e 's/^.*version //')],
[_gtgramtool_version=0])
AC_MSG_RESULT([$_gtgramtool_version])
# Function to compare version numbers
m4_define([compare_versions], [
m4_split([_gtgramtool_version], [gtgramtool_version_parts], [\[\.\]])
m4_split([_gtgramtool_min_version], [min_version_parts], [\[\.\]])
gtgramtool_version_ok=yes
for i in 1 2 3; do
if test ${gtgramtool_version_parts[$i]} -lt ${min_version_parts[$i]}; then
gtgramtool_version_ok=no
break
elif test ${gtgramtool_version_parts[$i]} -gt ${min_version_parts[$i]}; then
break
fi
done
])
AS_IF([test "x$enable_grammarchecker" != "xno"],
AC_MSG_CHECKING([whether the gtgramtool version is at least $_gtgramtool_min_version])
compare_versions
AX_COMPARE_VERSION([$_gtgramtool_version], [ge], [$_gtgramtool_min_version],
[gtgramtool_version_ok=yes], [gtgramtool_version_ok=no])
AS_IF([test "x${gtgramtool_version_ok}" != xno],
[AC_MSG_RESULT([$gtgramtool_version_ok])],
[AC_MSG_ERROR([$gtgramtool_too_old_message])]))
Expand Down

0 comments on commit c6e79bd

Please sign in to comment.