Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16159: Add prerelease suffixes to non-released ref-guide versions. (#812)

Houston Putmana2c44cf549dd
diff --git a/solr/solr-ref-guide/README.adoc b/solr/solr-ref-guide/README.adoc
index 443180a51ce..ec8214e0796 100644
--- a/solr/solr-ref-guide/README.adoc
+++ b/solr/solr-ref-guide/README.adoc
@@ -35,3 +35,6 @@ Note, this will not include any local changes to the ref guide, just what is pub
By default it will not include prerelase versions (the `main` and `branch_*x` branches), just the release versions (i.e. `branch_x_y`).
You can include all prerelease versions by including `-Prefguide.official.includePrereleaseVersions=true` or `SOLR_REF_GUIDE_OFFICIAL_INCLUDE_PRERELEASE=true` when building the official ref guide.
This is the option that is used when generating the nightlies refGuide release.
+
+**WARNING: NEVER run the "setOfficialAntoraYaml" task yourself. This is a job the release manager does as a part of the release process.
+The dependency versions in the antora.yml will be updated at release time, it is not meant to be kept up to date between releases.**
diff --git a/solr/solr-ref-guide/antora.template.yml b/solr/solr-ref-guide/antora.template.yml
index 0a7d8e2f33a..4d6b84871b4 100644
--- a/solr/solr-ref-guide/antora.template.yml
+++ b/solr/solr-ref-guide/antora.template.yml
@@ -1,8 +1,8 @@
name: solr
version: '${solr_version_major}_${solr_version_minor}'
-display_version: '${solr_version_major}.${solr_version_minor}'
-# Marking a version as 'prerelease: true' is only needed for unpublished branches
-#prerelease: true
+display_version: '${displayVersion}'
+# Marking a version as 'prerelease: false' is only needed for published branches (minor version branches, branch_x_y, that have had a release)
+prerelease: ${prerelease}
title: Solr Reference Guide
nav:
- modules/getting-started/getting-started-nav.adoc
diff --git a/solr/solr-ref-guide/antora.yml b/solr/solr-ref-guide/antora.yml
index 27411b19e8e..a6c5b8b5e7e 100644
--- a/solr/solr-ref-guide/antora.yml
+++ b/solr/solr-ref-guide/antora.yml
@@ -1,8 +1,8 @@
name: solr
version: '10_0'
-display_version: '10.0'
-# Marking a version as 'prerelease: true' is only needed for unpublished branches
-#prerelease: true
+display_version: '10.0-alpha'
+# Marking a version as 'prerelease: false' is only needed for published branches (minor version branches, branch_x_y, that have had a release)
+prerelease: -alpha
title: Solr Reference Guide
nav:
- modules/getting-started/getting-started-nav.adoc
@@ -26,11 +26,11 @@ asciidoc:
solr-docs-version: '10.0'
solr-full-version: '10.0.0'
- dep-version-commons-codec: '1.13'
+ dep-version-commons-codec: '1.15'
dep-version-dropwizard: '4.1.5'
- dep-version-hadoop: '3.2.0'
+ dep-version-hadoop: '3.3.2'
dep-version-log4j: '2.17.1'
- dep-version-opennlp: '1.9.1'
- dep-version-tika: '1.27'
+ dep-version-opennlp: '1.9.4'
+ dep-version-tika: '1.28.1'
dep-version-zookeeper: '3.7.0'
dep-version-lucene: '9.0.0'
diff --git a/solr/solr-ref-guide/build.gradle b/solr/solr-ref-guide/build.gradle
index 8a7b5cfd04a..54d9eef0e53 100644
--- a/solr/solr-ref-guide/build.gradle
+++ b/solr/solr-ref-guide/build.gradle
@@ -22,6 +22,7 @@ description = 'Solr Reference Guide'
def officialSiteIncludePrerelease = propertyOrEnvOrDefault("refguide.official.includePrereleaseVersions", "SOLR_REF_GUIDE_OFFICIAL_INCLUDE_PRERELEASE", "false").toBoolean()
def buildLocalUI = propertyOrEnvOrDefault("refguide.buildLocalUI", "SOLR_REF_GUIDE_BUILD_LOCAL_UI", "false").toBoolean()
+def isBranchReleased = propertyOrEnvOrDefault("refguide.isBranchReleased", "SOLR_REF_GUIDE_IS_BRANCH_RELEASED", "false").toBoolean()
// This escapes strings inside YAML templates
// WARNING: Strings in YAML must use single quotes for this to work correctly!
@@ -69,7 +70,7 @@ ext {
*/
task buildLocalAntoraYaml {
group = 'Site - Local'
- description "Creates an local antora.yml with all variables populated. Note: This will change the antora.yml in the repo, not a build folder."
+ description "Creates a local antora.yml with all variables populated."
def templateYaml = "antora.template.yml"
@@ -77,11 +78,24 @@ task buildLocalAntoraYaml {
outputs.file(project.ext.localAntoraYaml)
def splitVersion = version.toString().split("\\p{Punct}")
+ def displayVersion = "${splitVersion[0]}.${splitVersion[1]}"
+ def prerelease = false
+ if (!isBranchReleased) {
+ if (splitVersion[1] == "0") {
+ prerelease = "-alpha"
+ }
+ else {
+ prerelease = "-beta"
+ }
+ displayVersion += prerelease
+ }
def props = [
solr_version : "${splitVersion[0]}.${splitVersion[1]}.${splitVersion[2]}",
solr_version_major : splitVersion[0],
solr_version_minor : splitVersion[1],
solr_version_patch : splitVersion[2],
+ displayVersion : displayVersion,
+ prerelease : prerelease,
]
props.putAll([
solr_javadocs_link : "https://solr.apache.org/docs/${props.solr_version.replaceAll("\\.", "_")}",