Skip to content

Commit fa058f1

Browse files
onobcsobychacko
authored andcommitted
Add warning for snapshot docs
If the project version is a SNAPSHOT a warning is added at the top of the docs stating this fact.
1 parent 478bee2 commit fa058f1

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

spring-pulsar-docs/spring-pulsar-docs.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
9292
"spring-pulsar-binder-version": project.springPulsarBinderVersion ?: 'current',
9393
"spring-pulsar-starter-version": project.springPulsarStarterVersion ?: 'current',
9494
"pulsar-client-version": project.pulsarClientVersion ?: 'current',
95-
"pulsar-client-reactive-version": project.pulsarClientReactiveVersion ?: 'current'
95+
"pulsar-client-reactive-version": project.pulsarClientReactiveVersion ?: 'current',
96+
"is-snapshot-version": project.version.endsWith("-SNAPSHOT")
9697
}
9798
}
9899

spring-pulsar-docs/src/main/asciidoc/attributes-variables.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
:spring-pulsar-starter-version: current
77
:pulsar-client-version: current
88
:pulsar-client-reactive-version: current
9+
:is-snapshot-version: false
910

1011
:github: https://github.com/spring-projects/spring-pulsar
1112
:javadocs: https://docs.spring.io/spring-pulsar/docs/{spring-pulsar-version}/api

spring-pulsar-docs/src/main/asciidoc/index.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ include::authors.adoc[]
77

88
include::copyright.adoc[]
99

10+
ifeval::[{is-snapshot-version} == true]
11+
CAUTION: You are viewing documentation for a SNAPSHOT version ({spring-pulsar-version}). While it is usually in-sync with the underlying code, it is subject to change and not guaranteed to be up-to-date with the underlying code.
12+
endif::[]
13+
1014
include::intro.adoc[leveloffset=+1]
1115

1216
include::getting-help.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)