Skip to content

Commit

Permalink
Ignore the -snapshot suffix when comparing the Lucene version in th…
Browse files Browse the repository at this point in the history
…e build and the docs. (#27927)

Currently if the Lucene version is `X.Y.Z-snapshot-{gitrev}`, then we will
expect the docs to have `X.Y.Z-snapshot` as a Lucene version. I would like
to change it to `X.Y.Z` so that this doesn't need changing when we move from a
snapshot to a final release.
  • Loading branch information
jpountz committed Jan 15, 2018
1 parent 125aee6 commit 7cd5753
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions qa/verify-version-constants/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ task verifyDocsLuceneVersion {
throw new GradleException('Could not find lucene version in docs version file')
}
String expectedLuceneVersion = VersionProperties.lucene
if (expectedLuceneVersion.contains('-snapshot-')) {
expectedLuceneVersion = expectedLuceneVersion.substring(0, expectedLuceneVersion.lastIndexOf('-'))
expectedLuceneVersion = expectedLuceneVersion.toUpperCase(Locale.ROOT)
}
// remove potential -snapshot-{gitrev} suffix
expectedLuceneVersion -= ~/-snapshot-[0-9a-f]+$/
if (docsLuceneVersion != expectedLuceneVersion) {
throw new GradleException("Lucene version in docs [${docsLuceneVersion}] does not match version.properties [${expectedLuceneVersion}]")
}
Expand Down

0 comments on commit 7cd5753

Please sign in to comment.