mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Fix generation of versions to upgrade from
Vagrant tests use a static list of dependencies to upgrade from and we weren't including 5.0.0 deps in that list. Also when the list was incorrect we weren't sorting the "current" list so it was difficult to read. Also adds 2.4.1 to the list but *doesn't* add 5.0.0 because we still can't resolve it yet. We still only print an error when the list is wrong but don't abort the build. We'll abort the build once we've fixed resolution for 5.0.0 and we can re-add it.
This commit is contained in:
parent
9598616dfe
commit
9e3eacec35
@ -125,10 +125,7 @@ Set<String> getVersions() {
|
|||||||
new URL('https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/maven-metadata.xml').openStream().withStream { s ->
|
new URL('https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/maven-metadata.xml').openStream().withStream { s ->
|
||||||
xml = new XmlParser().parse(s)
|
xml = new XmlParser().parse(s)
|
||||||
}
|
}
|
||||||
|
Set<String> versions = new TreeSet<>(xml.versioning.versions.version.collect { it.text() }.findAll { it ==~ /[5]\.\d\.\d/ })
|
||||||
// List all N-1 releases from maven central
|
|
||||||
int major = Integer.parseInt(project.version.substring(0, project.version.indexOf('.'))) - 1
|
|
||||||
Set<String> versions = new TreeSet<>(xml.versioning.versions.version.collect { it.text() }.findAll { it ==~ /$major\.\d\.\d/ })
|
|
||||||
if (versions.isEmpty() == false) {
|
if (versions.isEmpty() == false) {
|
||||||
return versions;
|
return versions;
|
||||||
}
|
}
|
||||||
@ -151,7 +148,7 @@ task verifyPackagingTestUpgradeFromVersions {
|
|||||||
String maybeUpdateFromVersions = System.getProperty("tests.packaging.upgrade.from.versions", null)
|
String maybeUpdateFromVersions = System.getProperty("tests.packaging.upgrade.from.versions", null)
|
||||||
if (maybeUpdateFromVersions == null) {
|
if (maybeUpdateFromVersions == null) {
|
||||||
Set<String> versions = getVersions()
|
Set<String> versions = getVersions()
|
||||||
Set<String> actualVersions = new HashSet<>(Arrays.asList(upgradeFromVersions))
|
Set<String> actualVersions = new TreeSet<>(Arrays.asList(upgradeFromVersions))
|
||||||
if (!versions.equals(actualVersions)) {
|
if (!versions.equals(actualVersions)) {
|
||||||
println("out-of-date versions [" + actualVersions + "], expected [" + versions + "]; run gradle updatePackagingTestUpgradeFromVersions")
|
println("out-of-date versions [" + actualVersions + "], expected [" + versions + "]; run gradle updatePackagingTestUpgradeFromVersions")
|
||||||
// throw new GradleException("out-of-date versions [" + actualVersions + "], expected [" + versions + "]; run gradle updatePackagingTestUpgradeFromVersions")
|
// throw new GradleException("out-of-date versions [" + actualVersions + "], expected [" + versions + "]; run gradle updatePackagingTestUpgradeFromVersions")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user