Skip to content

Commit bc7efed

Browse files
committed
[#94] Fix major version test against 'beta'
From version 17, we took a different approach to download the documentation. The test has to be done against the numeric part of the major version, that could include 'beta[0-9]' as in '18beta1'. Close #94
1 parent 7844d97 commit bc7efed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/pgenv

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,8 @@ case $1 in
14011401
# due to a missing dependency (docbooks-xsl).
14021402
# Download the docs tarball separately and
14031403
# install it after build.
1404-
if [[ ${v%.*} -ge 17 ]]; then
1404+
major=${v//beta[0-9]/}
1405+
if [[ ${major%.*} -ge 17 ]]; then
14051406
PG_DOCS_TARBALL="postgresql-$v-docs.tar.gz"
14061407
pgenv_debug "Downloading docs tarball"
14071408

@@ -1462,7 +1463,8 @@ EOF
14621463
# dependency for docs since 17.x and above, extracted
14631464
# docs will be placed into the source directory,
14641465
# as if they were built.
1465-
if [[ ${v%.*} -ge 17 ]]; then
1466+
major=${v//beta[0-9]/}
1467+
if [[ ${major%.*} -ge 17 ]]; then
14661468
pgenv_debug "Unpacking docs tarball"
14671469
$PGENV_TAR zxf "$PG_DOCS_TARBALL"
14681470
fi

0 commit comments

Comments
 (0)