소스 검색

Ignore the `-snapshot` suffix when comparing the Lucene version in the 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.
Adrien Grand 7 년 전
부모
커밋
05e851f0b0
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      qa/verify-version-constants/build.gradle

+ 2 - 4
qa/verify-version-constants/build.gradle

@@ -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}]")
     }