Moved sphinx documentation source and get project version dinamically

This commit is contained in:
Luca Frosini 2024-05-22 17:28:15 +02:00
parent 95cdb46f00
commit 9cafb91277
10 changed files with 27 additions and 16 deletions

View File

@ -2,6 +2,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for gCube Catalogue (gCat) Service # Changelog for gCube Catalogue (gCat) Service
## [v2.5.4-SNAPSHOT]
-
## [v2.5.3] ## [v2.5.3]

View File

@ -14,6 +14,14 @@
<ruby-json-client disabled="true" /> <ruby-json-client disabled="true" />
<java-json-client disabled="true" /> <java-json-client disabled="true" />
<javascript-client disabled="true" /> <javascript-client disabled="true" />
<jaxb-xml-client disabled="true" />
<c-xml-client disabled="true" />
<csharp-xml-client disabled="true" />
<obj-c-xml-client disabled="true" />
<php-xml-client disabled="true" />
<spring-webnt disabled="true" />
<docs docsDir="${project.build.directory}" docsSubdir="api-docs" /> <docs docsDir="${project.build.directory}" docsSubdir="api-docs" />
<swagger basePath="/${project.artifactId}" /> <swagger basePath="/${project.artifactId}" />
<docs freemarkerTemplate="${project.basedir}/src/main/resources/META-INF/enunciate/d4science_docs.fmt"> <docs freemarkerTemplate="${project.basedir}/src/main/resources/META-INF/enunciate/d4science_docs.fmt">

16
pom.xml
View File

@ -12,7 +12,7 @@
<groupId>org.gcube.data-catalogue</groupId> <groupId>org.gcube.data-catalogue</groupId>
<artifactId>gcat</artifactId> <artifactId>gcat</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>2.5.3</version> <version>2.5.4-SNAPSHOT</version>
<name>gCube Catalogue (gCat) Service</name> <name>gCube Catalogue (gCat) Service</name>
<description> <description>
This service allows any client to publish on the gCube Catalogue. This service allows any client to publish on the gCube Catalogue.
@ -294,8 +294,8 @@
<configuration> <configuration>
<outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/docs</outputDirectory> <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/docs</outputDirectory>
<builder>html</builder> <builder>html</builder>
<configDirectory>${basedir}/docs</configDirectory> <configDirectory>${basedir}/sphinx</configDirectory>
<sourceDirectory>${basedir}/docs</sourceDirectory> <sourceDirectory>${basedir}/sphinx</sourceDirectory>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
@ -345,16 +345,6 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<attachClasses>true</attachClasses>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>

View File

@ -10,11 +10,21 @@
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
# #
# import os import os
# import sys # import sys
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
def getVersion():
cmd = """cd .. && \
mvn -q \
-Dexec.executable=echo \
-Dexec.args='${project.version}' \
--non-recursive \
exec:exec"""
stream = os.popen(cmd)
return stream.read().strip()
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'gCube Catalogue (gCat) Service' project = 'gCube Catalogue (gCat) Service'
@ -22,7 +32,7 @@ copyright = '2022, Luca Frosini (ISTI-CNR)'
author = 'Luca Frosini (ISTI-CNR)' author = 'Luca Frosini (ISTI-CNR)'
# The full version, including alpha/beta/rc tags # The full version, including alpha/beta/rc tags
release = '2.5.1' release = getVersion()
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------

View File

@ -1,5 +1,5 @@
Dev and Pre Users used for moderation tests Dev and Pre Users used for moderation tests
======== ============================================
To perform moderation tests in dev and preproduction infrastructure we use different users with the indicated roles. To perform moderation tests in dev and preproduction infrastructure we use different users with the indicated roles.