Skip to content

Commit

Permalink
Add warning for snapshot docs
Browse files Browse the repository at this point in the history
If the project version is a SNAPSHOT a warning
is added at the top of the docs stating this fact.
  • Loading branch information
onobc authored and sobychacko committed Jun 7, 2023
1 parent 478bee2 commit fa058f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spring-pulsar-docs/spring-pulsar-docs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
"spring-pulsar-binder-version": project.springPulsarBinderVersion ?: 'current',
"spring-pulsar-starter-version": project.springPulsarStarterVersion ?: 'current',
"pulsar-client-version": project.pulsarClientVersion ?: 'current',
"pulsar-client-reactive-version": project.pulsarClientReactiveVersion ?: 'current'
"pulsar-client-reactive-version": project.pulsarClientReactiveVersion ?: 'current',
"is-snapshot-version": project.version.endsWith("-SNAPSHOT")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:spring-pulsar-starter-version: current
:pulsar-client-version: current
:pulsar-client-reactive-version: current
:is-snapshot-version: false

:github: https://github.com/spring-projects/spring-pulsar
:javadocs: https://docs.spring.io/spring-pulsar/docs/{spring-pulsar-version}/api
Expand Down
4 changes: 4 additions & 0 deletions spring-pulsar-docs/src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ include::authors.adoc[]

include::copyright.adoc[]

ifeval::[{is-snapshot-version} == true]
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.
endif::[]

include::intro.adoc[leveloffset=+1]

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

0 comments on commit fa058f1

Please sign in to comment.