From cbb13925649995b075b61eee6cff3804a022c270 Mon Sep 17 00:00:00 2001 From: Bear Date: Fri, 5 Jun 2026 15:05:44 -0500 Subject: [PATCH 1/2] Ruby 4.0.5-1 release --- bin/{ => archived}/ruby3.4.5/bearsampp.conf | 0 bin/{ => archived}/ruby3.4.5/rubygems/install.bat | 0 .../ruby3.4.5/rubygems/rubygems.properties | 0 bin/{ => archived}/ruby3.4.7/bearsampp.conf | 0 bin/{ => archived}/ruby3.4.7/rubygems/install.bat | 0 .../ruby3.4.7/rubygems/rubygems.properties | 0 bin/{ => archived}/ruby4.0.0-1/bearsampp.conf | 0 bin/{ => archived}/ruby4.0.0-1/rubygems/install.bat | 0 .../ruby4.0.0-1/rubygems/rubygems.properties | 0 bin/ruby4.0.5-1/bearsampp.conf | 5 +++++ bin/ruby4.0.5-1/rubygems/install.bat | 10 ++++++++++ bin/ruby4.0.5-1/rubygems/rubygems.properties | 1 + build.properties | 2 +- 13 files changed, 17 insertions(+), 1 deletion(-) rename bin/{ => archived}/ruby3.4.5/bearsampp.conf (100%) rename bin/{ => archived}/ruby3.4.5/rubygems/install.bat (100%) rename bin/{ => archived}/ruby3.4.5/rubygems/rubygems.properties (100%) rename bin/{ => archived}/ruby3.4.7/bearsampp.conf (100%) rename bin/{ => archived}/ruby3.4.7/rubygems/install.bat (100%) rename bin/{ => archived}/ruby3.4.7/rubygems/rubygems.properties (100%) rename bin/{ => archived}/ruby4.0.0-1/bearsampp.conf (100%) rename bin/{ => archived}/ruby4.0.0-1/rubygems/install.bat (100%) rename bin/{ => archived}/ruby4.0.0-1/rubygems/rubygems.properties (100%) create mode 100644 bin/ruby4.0.5-1/bearsampp.conf create mode 100644 bin/ruby4.0.5-1/rubygems/install.bat create mode 100644 bin/ruby4.0.5-1/rubygems/rubygems.properties diff --git a/bin/ruby3.4.5/bearsampp.conf b/bin/archived/ruby3.4.5/bearsampp.conf similarity index 100% rename from bin/ruby3.4.5/bearsampp.conf rename to bin/archived/ruby3.4.5/bearsampp.conf diff --git a/bin/ruby3.4.5/rubygems/install.bat b/bin/archived/ruby3.4.5/rubygems/install.bat similarity index 100% rename from bin/ruby3.4.5/rubygems/install.bat rename to bin/archived/ruby3.4.5/rubygems/install.bat diff --git a/bin/ruby3.4.5/rubygems/rubygems.properties b/bin/archived/ruby3.4.5/rubygems/rubygems.properties similarity index 100% rename from bin/ruby3.4.5/rubygems/rubygems.properties rename to bin/archived/ruby3.4.5/rubygems/rubygems.properties diff --git a/bin/ruby3.4.7/bearsampp.conf b/bin/archived/ruby3.4.7/bearsampp.conf similarity index 100% rename from bin/ruby3.4.7/bearsampp.conf rename to bin/archived/ruby3.4.7/bearsampp.conf diff --git a/bin/ruby3.4.7/rubygems/install.bat b/bin/archived/ruby3.4.7/rubygems/install.bat similarity index 100% rename from bin/ruby3.4.7/rubygems/install.bat rename to bin/archived/ruby3.4.7/rubygems/install.bat diff --git a/bin/ruby3.4.7/rubygems/rubygems.properties b/bin/archived/ruby3.4.7/rubygems/rubygems.properties similarity index 100% rename from bin/ruby3.4.7/rubygems/rubygems.properties rename to bin/archived/ruby3.4.7/rubygems/rubygems.properties diff --git a/bin/ruby4.0.0-1/bearsampp.conf b/bin/archived/ruby4.0.0-1/bearsampp.conf similarity index 100% rename from bin/ruby4.0.0-1/bearsampp.conf rename to bin/archived/ruby4.0.0-1/bearsampp.conf diff --git a/bin/ruby4.0.0-1/rubygems/install.bat b/bin/archived/ruby4.0.0-1/rubygems/install.bat similarity index 100% rename from bin/ruby4.0.0-1/rubygems/install.bat rename to bin/archived/ruby4.0.0-1/rubygems/install.bat diff --git a/bin/ruby4.0.0-1/rubygems/rubygems.properties b/bin/archived/ruby4.0.0-1/rubygems/rubygems.properties similarity index 100% rename from bin/ruby4.0.0-1/rubygems/rubygems.properties rename to bin/archived/ruby4.0.0-1/rubygems/rubygems.properties diff --git a/bin/ruby4.0.5-1/bearsampp.conf b/bin/ruby4.0.5-1/bearsampp.conf new file mode 100644 index 00000000..20b3718e --- /dev/null +++ b/bin/ruby4.0.5-1/bearsampp.conf @@ -0,0 +1,5 @@ +rubyVersion = "4.0.5-1" +rubyExe = "bin/ruby.exe" +rubyConsoleExe = "bin/setrbvars.cmd" + +bundleRelease = "@RELEASE_VERSION@" diff --git a/bin/ruby4.0.5-1/rubygems/install.bat b/bin/ruby4.0.5-1/rubygems/install.bat new file mode 100644 index 00000000..04ae2182 --- /dev/null +++ b/bin/ruby4.0.5-1/rubygems/install.bat @@ -0,0 +1,10 @@ +@echo off +set RUBYBINPATH=%~dp0..\bin +pushd %RUBYBINPATH% +set RUBYBINPATH=%CD% +popd + +CALL "%RUBYBINPATH%\gem.cmd" install rubygems-update.gem --local --no-document +IF %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% + +"%RUBYBINPATH%\gem.cmd" update --system --no-document diff --git a/bin/ruby4.0.5-1/rubygems/rubygems.properties b/bin/ruby4.0.5-1/rubygems/rubygems.properties new file mode 100644 index 00000000..558581f9 --- /dev/null +++ b/bin/ruby4.0.5-1/rubygems/rubygems.properties @@ -0,0 +1 @@ +rubygems = https://github.com/Bearsampp/modules-untouched/releases/download/Ruby-2026.6.5/rubygems-update-4.0.13.gem diff --git a/build.properties b/build.properties index ede3fec1..03ccaf0e 100644 --- a/build.properties +++ b/build.properties @@ -1,4 +1,4 @@ bundle.name=ruby -bundle.release=2026.4.12 +bundle.release=2026.6.5 bundle.type=tools bundle.format=7z From a7c53c7a5a8ee59ffa9a02db6cd7b5f7a6364589 Mon Sep 17 00:00:00 2001 From: Bear Date: Fri, 5 Jun 2026 16:05:36 -0500 Subject: [PATCH 2/2] updated build.gradle to support semantic version comparison --- build.gradle | 58 ++++++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/build.gradle b/build.gradle index ac28c8d8..da845966 100644 --- a/build.gradle +++ b/build.gradle @@ -503,6 +503,23 @@ def downloadFile(String url, File destDir) { } // Helper methods for version discovery and selection + +// Helper for semantic version comparison +def versionComparator = { a, b -> + def aParts = a.tokenize('.').collect { it.isInteger() ? it.toInteger() : it } + def bParts = b.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 +} + def findAvailableVersions = { def binDir = new File(projectDir, 'bin') def archivedDir = new File(projectDir, 'bin/archived') @@ -524,23 +541,14 @@ def findAvailableVersions = { ) } - return versions.unique() + // Remove duplicates and sort semantically + return versions.unique().sort(versionComparator) } def latestVersion = { List versions -> if (versions.isEmpty()) return null - // Compare numerically by dot-separated parts - return versions.max { a, b -> - def pa = a.split(/[.\-]/).collect { it.isInteger() ? it as int : 0 } - def pb = b.split(/[.\-]/).collect { it.isInteger() ? it as int : 0 } - def len = Math.max(pa.size(), pb.size()) - for (int i = 0; i < len; i++) { - def ai = i < pa.size() ? pa[i] : 0 - def bi = i < pb.size() ? pb[i] : 0 - if (ai != bi) return ai <=> bi - } - return 0 - } + // Compare semantically + return versions.max(versionComparator) } // Task: Resolve version (interactive by default; supports -PbundleVersion and '*') @@ -556,16 +564,7 @@ tasks.register('resolveVersion') { doLast { def supplied = versionProperty as String // Aggregate both bin/ and bin/archived/ and display with location tags - def all = findAvailableVersions().sort { a, b -> - def pa = a.split(/[.\-]/).collect { it.isInteger() ? it as int : 0 } - def pb = b.split(/[.\-]/).collect { it.isInteger() ? it as int : 0 } - for (int i=0; i bi - } - return 0 - } + def all = findAvailableVersions() def inBin = new File(projectDir, 'bin').exists() ? (new File(projectDir, 'bin').listFiles() ?.findAll { it.isDirectory() && it.name.startsWith(bundleName) && it.name != 'archived' } ?.collect { it.name.replace(bundleName, '') } ?: []) : [] @@ -1156,7 +1155,7 @@ tasks.register('listReleases') { println "\nAvailable Ruby Releases:" println "-".multiply(80) - releases.sort { it.key }.each { version, url -> + releases.sort { a, b -> versionComparator(a.key, b.key) }.each { version, url -> println " ${version.padRight(10)} -> ${url}" } println "-".multiply(80) @@ -1186,16 +1185,7 @@ tasks.register('listVersions') { ?.findAll { it.isDirectory() && it.name.startsWith(bundleName) } ?.collect { it.name.replace(bundleName, '') } ?: []) : [] - def allVersions = (inBin + inArchived).toSet().toList().sort { a, b -> - def pa = a.split(/[.\-]/).collect { it.isInteger() ? it as int : 0 } - def pb = b.split(/[.\-]/).collect { it.isInteger() ? it as int : 0 } - for (int i = 0; i < Math.max(pa.size(), pb.size()); i++) { - def ai = i < pa.size() ? pa[i] : 0 - def bi = i < pb.size() ? pb[i] : 0 - if (ai != bi) return ai <=> bi - } - return 0 - } + def allVersions = findAvailableVersions() println "\nAvailable ${bundleName} versions (index, version, location):" println "-".multiply(60)