From 9cafb9127746dcc1a5c3ead2aeba2626e628add5 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 22 May 2024 17:28:15 +0200 Subject: [PATCH] Moved sphinx documentation source and get project version dinamically --- CHANGELOG.md | 3 +++ enunciate.xml | 8 ++++++++ pom.xml | 16 +++------------- {docs => sphinx}/.gitignore | 0 {docs => sphinx}/Makefile | 0 {docs => sphinx}/conf.py | 14 ++++++++++++-- {docs => sphinx}/index.md | 0 {docs => sphinx}/index.rst | 0 {docs => sphinx}/make.bat | 0 {docs => sphinx}/tests.rst | 2 +- 10 files changed, 27 insertions(+), 16 deletions(-) rename {docs => sphinx}/.gitignore (100%) rename {docs => sphinx}/Makefile (100%) rename {docs => sphinx}/conf.py (86%) rename {docs => sphinx}/index.md (100%) rename {docs => sphinx}/index.rst (100%) rename {docs => sphinx}/make.bat (100%) rename {docs => sphinx}/tests.rst (96%) diff --git a/CHANGELOG.md b/CHANGELOG.md index b25cf8b..abf62b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/enunciate.xml b/enunciate.xml index 5313cc5..50b0cd1 100644 --- a/enunciate.xml +++ b/enunciate.xml @@ -14,6 +14,14 @@ + + + + + + + + diff --git a/pom.xml b/pom.xml index 64ce68e..2d37fde 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.gcube.data-catalogue gcat war - 2.5.3 + 2.5.4-SNAPSHOT gCube Catalogue (gCat) Service This service allows any client to publish on the gCube Catalogue. @@ -294,8 +294,8 @@ ${project.build.directory}/${project.artifactId}-${project.version}/docs html - ${basedir}/docs - ${basedir}/docs + ${basedir}/sphinx + ${basedir}/sphinx @@ -345,16 +345,6 @@ - - - - org.apache.maven.plugins - maven-war-plugin - - true - - - diff --git a/docs/.gitignore b/sphinx/.gitignore similarity index 100% rename from docs/.gitignore rename to sphinx/.gitignore diff --git a/docs/Makefile b/sphinx/Makefile similarity index 100% rename from docs/Makefile rename to sphinx/Makefile diff --git a/docs/conf.py b/sphinx/conf.py similarity index 86% rename from docs/conf.py rename to sphinx/conf.py index cd70927..0948e1f 100644 --- a/docs/conf.py +++ b/sphinx/conf.py @@ -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 --------------------------------------------------- diff --git a/docs/index.md b/sphinx/index.md similarity index 100% rename from docs/index.md rename to sphinx/index.md diff --git a/docs/index.rst b/sphinx/index.rst similarity index 100% rename from docs/index.rst rename to sphinx/index.rst diff --git a/docs/make.bat b/sphinx/make.bat similarity index 100% rename from docs/make.bat rename to sphinx/make.bat diff --git a/docs/tests.rst b/sphinx/tests.rst similarity index 96% rename from docs/tests.rst rename to sphinx/tests.rst index fca9245..51c452a 100644 --- a/docs/tests.rst +++ b/sphinx/tests.rst @@ -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.