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
## [v2.5.4-SNAPSHOT]
-
## [v2.5.3]

View File

@ -14,6 +14,14 @@
<ruby-json-client disabled="true" />
<java-json-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" />
<swagger basePath="/${project.artifactId}" />
<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>
<artifactId>gcat</artifactId>
<packaging>war</packaging>
<version>2.5.3</version>
<version>2.5.4-SNAPSHOT</version>
<name>gCube Catalogue (gCat) Service</name>
<description>
This service allows any client to publish on the gCube Catalogue.
@ -294,8 +294,8 @@
<configuration>
<outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/docs</outputDirectory>
<builder>html</builder>
<configDirectory>${basedir}/docs</configDirectory>
<sourceDirectory>${basedir}/docs</sourceDirectory>
<configDirectory>${basedir}/sphinx</configDirectory>
<sourceDirectory>${basedir}/sphinx</sourceDirectory>
</configuration>
<executions>
<execution>
@ -345,16 +345,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<attachClasses>true</attachClasses>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -10,11 +10,21 @@
# 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.
#
# import os
import os
# import sys
# 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 = 'gCube Catalogue (gCat) Service'
@ -22,7 +32,7 @@ copyright = '2022, Luca Frosini (ISTI-CNR)'
author = 'Luca Frosini (ISTI-CNR)'
# The full version, including alpha/beta/rc tags
release = '2.5.1'
release = getVersion()
# -- General configuration ---------------------------------------------------

View File

@ -1,5 +1,5 @@
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.