From bee44a49454ff06566c963d75f9b47850b2b0979 Mon Sep 17 00:00:00 2001 From: Bear Date: Tue, 2 Jun 2026 23:17:15 -0500 Subject: [PATCH 1/3] Add PostgreSQL versions 18.4, 17.10, 16.14, 15.18, and 14.23 with configuration files --- bin/postgresql14.23/bearsampp.conf | 14 ++++++++++ bin/postgresql14.23/init.bat | 5 ++++ bin/postgresql14.23/pg_hba.conf.ber | 3 +++ bin/postgresql14.23/postgresql.conf.ber | 35 +++++++++++++++++++++++++ bin/postgresql15.18/bearsampp.conf | 14 ++++++++++ bin/postgresql15.18/init.bat | 5 ++++ bin/postgresql15.18/pg_hba.conf.ber | 3 +++ bin/postgresql15.18/postgresql.conf.ber | 35 +++++++++++++++++++++++++ bin/postgresql16.14/bearsampp.conf | 14 ++++++++++ bin/postgresql16.14/init.bat | 5 ++++ bin/postgresql16.14/pg_hba.conf.ber | 3 +++ bin/postgresql16.14/postgresql.conf.ber | 35 +++++++++++++++++++++++++ bin/postgresql17.10/bearsampp.conf | 14 ++++++++++ bin/postgresql17.10/init.bat | 5 ++++ bin/postgresql17.10/pg_hba.conf.ber | 3 +++ bin/postgresql17.10/postgresql.conf.ber | 35 +++++++++++++++++++++++++ bin/postgresql18.4/bearsampp.conf | 14 ++++++++++ bin/postgresql18.4/init.bat | 5 ++++ bin/postgresql18.4/pg_hba.conf.ber | 3 +++ bin/postgresql18.4/postgresql.conf.ber | 35 +++++++++++++++++++++++++ build.gradle | 8 +++--- build.properties | 6 +++++ gradle.properties | 6 ----- 23 files changed, 295 insertions(+), 10 deletions(-) create mode 100644 bin/postgresql14.23/bearsampp.conf create mode 100644 bin/postgresql14.23/init.bat create mode 100644 bin/postgresql14.23/pg_hba.conf.ber create mode 100644 bin/postgresql14.23/postgresql.conf.ber create mode 100644 bin/postgresql15.18/bearsampp.conf create mode 100644 bin/postgresql15.18/init.bat create mode 100644 bin/postgresql15.18/pg_hba.conf.ber create mode 100644 bin/postgresql15.18/postgresql.conf.ber create mode 100644 bin/postgresql16.14/bearsampp.conf create mode 100644 bin/postgresql16.14/init.bat create mode 100644 bin/postgresql16.14/pg_hba.conf.ber create mode 100644 bin/postgresql16.14/postgresql.conf.ber create mode 100644 bin/postgresql17.10/bearsampp.conf create mode 100644 bin/postgresql17.10/init.bat create mode 100644 bin/postgresql17.10/pg_hba.conf.ber create mode 100644 bin/postgresql17.10/postgresql.conf.ber create mode 100644 bin/postgresql18.4/bearsampp.conf create mode 100644 bin/postgresql18.4/init.bat create mode 100644 bin/postgresql18.4/pg_hba.conf.ber create mode 100644 bin/postgresql18.4/postgresql.conf.ber create mode 100644 build.properties diff --git a/bin/postgresql14.23/bearsampp.conf b/bin/postgresql14.23/bearsampp.conf new file mode 100644 index 00000000..4724b2a5 --- /dev/null +++ b/bin/postgresql14.23/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "14.23" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql14.23/init.bat b/bin/postgresql14.23/init.bat new file mode 100644 index 00000000..f0acb2d4 --- /dev/null +++ b/bin/postgresql14.23/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql14.23/pg_hba.conf.ber b/bin/postgresql14.23/pg_hba.conf.ber new file mode 100644 index 00000000..29b8f8bf --- /dev/null +++ b/bin/postgresql14.23/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql14.23/postgresql.conf.ber b/bin/postgresql14.23/postgresql.conf.ber new file mode 100644 index 00000000..d1410490 --- /dev/null +++ b/bin/postgresql14.23/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql14.23/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql14.23/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql14.23/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/bin/postgresql15.18/bearsampp.conf b/bin/postgresql15.18/bearsampp.conf new file mode 100644 index 00000000..b9ce381b --- /dev/null +++ b/bin/postgresql15.18/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "15.18" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql15.18/init.bat b/bin/postgresql15.18/init.bat new file mode 100644 index 00000000..f0acb2d4 --- /dev/null +++ b/bin/postgresql15.18/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql15.18/pg_hba.conf.ber b/bin/postgresql15.18/pg_hba.conf.ber new file mode 100644 index 00000000..29b8f8bf --- /dev/null +++ b/bin/postgresql15.18/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql15.18/postgresql.conf.ber b/bin/postgresql15.18/postgresql.conf.ber new file mode 100644 index 00000000..a7c31c04 --- /dev/null +++ b/bin/postgresql15.18/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.18/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.18/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.18/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/bin/postgresql16.14/bearsampp.conf b/bin/postgresql16.14/bearsampp.conf new file mode 100644 index 00000000..5bc07ea6 --- /dev/null +++ b/bin/postgresql16.14/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "16.14" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql16.14/init.bat b/bin/postgresql16.14/init.bat new file mode 100644 index 00000000..f0acb2d4 --- /dev/null +++ b/bin/postgresql16.14/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql16.14/pg_hba.conf.ber b/bin/postgresql16.14/pg_hba.conf.ber new file mode 100644 index 00000000..29b8f8bf --- /dev/null +++ b/bin/postgresql16.14/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql16.14/postgresql.conf.ber b/bin/postgresql16.14/postgresql.conf.ber new file mode 100644 index 00000000..653546a1 --- /dev/null +++ b/bin/postgresql16.14/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.14/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.14/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.14/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/bin/postgresql17.10/bearsampp.conf b/bin/postgresql17.10/bearsampp.conf new file mode 100644 index 00000000..4b3f8fde --- /dev/null +++ b/bin/postgresql17.10/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "17.10" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql17.10/init.bat b/bin/postgresql17.10/init.bat new file mode 100644 index 00000000..f0acb2d4 --- /dev/null +++ b/bin/postgresql17.10/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql17.10/pg_hba.conf.ber b/bin/postgresql17.10/pg_hba.conf.ber new file mode 100644 index 00000000..29b8f8bf --- /dev/null +++ b/bin/postgresql17.10/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql17.10/postgresql.conf.ber b/bin/postgresql17.10/postgresql.conf.ber new file mode 100644 index 00000000..1a919f3e --- /dev/null +++ b/bin/postgresql17.10/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql17.10/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql17.10/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql17.10/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/bin/postgresql18.4/bearsampp.conf b/bin/postgresql18.4/bearsampp.conf new file mode 100644 index 00000000..bfa49608 --- /dev/null +++ b/bin/postgresql18.4/bearsampp.conf @@ -0,0 +1,14 @@ +postgresqlVersion = "18.4" +postgresqlCtlExe = "bin/pg_ctl.exe" +postgresqlCliExe = "bin/psql.exe" +postgresqlDumpExe = "bin/pg_dump.exe" +postgresqlDumpAllExe = "bin/pg_dumpall.exe" +postgresqlConf = "data/postgresql.conf" +postgresqlUserConf = "data/pg_hba.conf" +postgresqlAltConf = "postgresql.conf.ber" +postgresqlAltUserConf = "pg_hba.conf.ber" +postgresqlPort = "5432" +postgresqlRootUser = "postgres" +postgresqlRootPwd = "" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/postgresql18.4/init.bat b/bin/postgresql18.4/init.bat new file mode 100644 index 00000000..f0acb2d4 --- /dev/null +++ b/bin/postgresql18.4/init.bat @@ -0,0 +1,5 @@ +@ECHO OFF + +%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1 +copy /y "%~dp0postgresql.conf.ber" "%~dp0data\postgresql.conf" +copy /y "%~dp0pg_hba.conf.ber" "%~dp0data\pg_hba.conf" diff --git a/bin/postgresql18.4/pg_hba.conf.ber b/bin/postgresql18.4/pg_hba.conf.ber new file mode 100644 index 00000000..29b8f8bf --- /dev/null +++ b/bin/postgresql18.4/pg_hba.conf.ber @@ -0,0 +1,3 @@ +# TYPE DATABASE USER ADDRESS METHOD + host all all 127.0.0.1/32 trust + host all all ::1/128 trust diff --git a/bin/postgresql18.4/postgresql.conf.ber b/bin/postgresql18.4/postgresql.conf.ber new file mode 100644 index 00000000..d505c599 --- /dev/null +++ b/bin/postgresql18.4/postgresql.conf.ber @@ -0,0 +1,35 @@ +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql18.4/data' +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql18.4/data/pg_hba.conf' +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql18.4/data/pg_ident.conf' + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ +listen_addresses = '*' +port = 5432 +max_connections = 100 + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ +shared_buffers = 32MB + +#------------------------------------------------------------------------------ +# ERROR REPORTING AND LOGGING +#------------------------------------------------------------------------------ +log_destination = 'stderr' +logging_collector = on +log_directory = '~BEARSAMPP_LIN_PATH~/logs' +log_filename = 'postgresql.log' +log_file_mode = 0777 +log_truncate_on_rotation = off +log_rotation_age = 0 +log_rotation_size = 0 + +client_min_messages = notice +log_min_messages = warning +log_min_error_statement = error +log_min_duration_statement = -1 diff --git a/build.gradle b/build.gradle index 936ef376..c546f565 100644 --- a/build.gradle +++ b/build.gradle @@ -20,9 +20,9 @@ plugins { id 'base' } -// Load build properties from gradle.properties +// Load build properties from build.properties def buildProps = new Properties() -file('gradle.properties').withInputStream { buildProps.load(it) } +file('build.properties').withInputStream { buildProps.load(it) } // Project information group = 'com.bearsampp.modules' @@ -35,14 +35,14 @@ ext { rootDir = projectDir.parent devPath = file("${rootDir}/dev").absolutePath - // Bundle properties from gradle.properties + // Bundle properties from build.properties bundleName = buildProps.getProperty('bundle.name', 'postgresql') bundleRelease = buildProps.getProperty('bundle.release', '1.0.0') bundleType = buildProps.getProperty('bundle.type', 'bins') bundleFormat = buildProps.getProperty('bundle.format', '7z') // Build paths - with configurable base path - // Priority: 1) gradle.properties, 2) Environment variable, 3) Default + // Priority: 1) build.properties, 2) Environment variable, 3) Default def buildPathFromProps = buildProps.getProperty('build.path', '').trim() def buildPathFromEnv = System.getenv('BEARSAMPP_BUILD_PATH') ?: '' def defaultBuildPath = "${rootDir}/bearsampp-build" diff --git a/build.properties b/build.properties new file mode 100644 index 00000000..cf762258 --- /dev/null +++ b/build.properties @@ -0,0 +1,6 @@ +bundle.name = postgresql +bundle.release = 2025.6.2 +bundle.type = bins +bundle.format = 7z + +#build.path = C:/Bearsampp-build diff --git a/gradle.properties b/gradle.properties index 408d35d3..cb651ab9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,5 @@ # Gradle Build Properties for Bearsampp Module PostgreSQL -# Bundle configuration -bundle.name = postgresql -bundle.release = 2025.3.8 -bundle.type = bins -bundle.format = 7z - # Gradle daemon configuration org.gradle.daemon=true org.gradle.parallel=true From 6f71da2cec596c0d7be618f5ff42780e5aad225b Mon Sep 17 00:00:00 2001 From: Bear Date: Tue, 2 Jun 2026 23:22:49 -0500 Subject: [PATCH 2/3] fix gradle build since build.properties creation --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c546f565..da927e03 100644 --- a/build.gradle +++ b/build.gradle @@ -592,9 +592,9 @@ tasks.register('release') { println "Preparing archive..." // Determine build output path following Bruno pattern - // bearsampp-build/{bundleType}/{bundleName} + // bearsampp-build/{bundleType}/{bundleName}/{bundleRelease} def buildPath = file(buildBasePath) - def buildBinsPath = file("${buildPath}/${bundleType}/${bundleName}") + def buildBinsPath = file("${buildPath}/${bundleType}/${bundleName}/${bundleRelease}") buildBinsPath.mkdirs() // Build archive filename From 6f125812417a92754a7aab6abc0b04d786c1b12d Mon Sep 17 00:00:00 2001 From: Bear Date: Fri, 5 Jun 2026 16:09:51 -0500 Subject: [PATCH 3/3] Apply semantic versioning sort to listReleases task and ensure consistency across build.gradle Co-authored-by: Junie --- build.gradle | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index da927e03..cf750447 100644 --- a/build.gradle +++ b/build.gradle @@ -856,7 +856,20 @@ tasks.register('listReleases') { println "\nAvailable PostgreSQL Releases (modules-untouched):" println "-".multiply(80) - props.sort { a, b -> a.key <=> b.key }.each { version, url -> + props.sort { a, b -> + def aParts = a.key.tokenize('.').collect { it.isInteger() ? it.toInteger() : it } + def bParts = b.key.tokenize('.').collect { it.isInteger() ? it.toInteger() : it } + for (int i = 0; i < Math.max(aParts.size(), bParts.size()); i++) { + def aVal = i < aParts.size() ? aParts[i] : 0 + def bVal = i < bParts.size() ? bParts[i] : 0 + if (aVal.getClass() != bVal.getClass()) { + aVal = aVal.toString() + bVal = bVal.toString() + } + if (aVal != bVal) return aVal <=> bVal + } + return 0 + }.each { version, url -> println " ${version.padRight(10)} -> ${url}" } println "-".multiply(80)