mirror of
https://github.com/ovh/the-bastion.git
synced 2025-11-17 14:31:04 +08:00
chore: doc: get current software version dynamically
This commit is contained in:
parent
401e93941a
commit
b8d9ed2ccb
3 changed files with 7 additions and 3 deletions
|
|
@ -7,9 +7,13 @@ SPHINXBUILD = sphinx-build
|
|||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
|
||||
VERSION_FILES = conf.py installation/basic.rst
|
||||
VERSION := $(shell perl -e 'require "../../lib/perl/OVH/Bastion.pm"; print $$OVH::Bastion::VERSION')
|
||||
|
||||
all: plugins default
|
||||
|
||||
default: Makefile
|
||||
@sed -i -e "s/__VERSION__/$(VERSION)/g" $(VERSION_FILES)
|
||||
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@rsync -a --delete _build/html/ ../../docs/
|
||||
@echo "HTML documentation copied to ../../docs/"
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ copyright = '2020, OVHcloud'
|
|||
author = 'The Bastion Authors'
|
||||
|
||||
# The short X.Y version
|
||||
version = '3.00.00'
|
||||
version = '__VERSION__'
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '3.00.00'
|
||||
release = '__VERSION__'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ Get the tarball of the latest release, which can be found `here <https://github.
|
|||
.. code-block:: shell
|
||||
|
||||
test -d /opt/bastion || mkdir -p /opt/bastion
|
||||
tar -C /opt/bastion v3.00.00.tar.gz
|
||||
tar -C /opt/bastion v__VERSION__.tar.gz
|
||||
|
||||
The code supports being hosted somewhere else on the filesystem hierarchy, but this is discouraged as you might need to adjust a lot of configuration files (notably sudoers.d, cron.d, init.d) that needs an absolute path.
|
||||
You should end up with directories such as ``bin``, ``lib``, etc. directly under ``/opt/bastion``.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue