Skip to content

Commit

Permalink
fix postgis version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ImreSamu committed Sep 4, 2024
1 parent 1878445 commit a8e6ba0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,14 @@ declare -A postgisSrcSha256=()
declare -A postgisSrcSha1=()
for variant in ${postgis_versions}; do
_postgisMinor=$(echo "$variant" | cut -d. -f2)
postgisLastTags[$variant]=$(echo "$postgis_all_v3_versions" | grep "^3\.${_postgisMinor}\." | version_reverse_sort | head -n 1 || true)

# check the latest released 3.x version (so not alpha/beta/rc)
postgisLastTags[$variant]=$(echo "$postgis_all_v3_versions" | grep "^3\.${_postgisMinor}\." | grep -v '[a-zA-Z]' | version_reverse_sort | head -n 1 || true)
# Check if the result is empty
if [[ -z "${postgisLastTags[$variant]}" ]]; then
# If empty, run the command again without excluding pre-releases (alpha/beta/rc)
postgisLastTags[$variant]=$(echo "$postgis_all_v3_versions" | grep "^3\.${_postgisMinor}\." | version_reverse_sort | head -n 1 || true)
fi

if [[ ${postgisLastTags[$variant]} =~ [a-zA-Z] ]]; then
postgisLastDockerTags[$variant]=${postgisLastTags[$variant]}
Expand Down

0 comments on commit a8e6ba0

Please sign in to comment.