From 47243c0839475529d987d2ec24189f5061f879b1 Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Wed, 9 Feb 2022 19:46:24 +0000 Subject: [PATCH] userguide: dynamically determine copyright date This uses the date of doc generation to determine the copyright date for the trailing date. Based on Jeff Lucovsky solution. (cherry picked from commit e0c8dba7ac6eaa757daf80245688f9f2b2496eff) --- doc/userguide/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/userguide/conf.py b/doc/userguide/conf.py index baf4726e62..1474dd87af 100644 --- a/doc/userguide/conf.py +++ b/doc/userguide/conf.py @@ -16,6 +16,8 @@ import sys import os import shlex import re +import subprocess +import datetime on_rtd = os.environ.get('READTHEDOCS', None) == 'True' @@ -50,7 +52,8 @@ master_doc = 'index' # General information about the project. project = u'Suricata' -copyright = u'2016-2019, OISF' +end_year = datetime.datetime.now().date().year +copyright = u'2016-{}, OISF'.format(end_year) author = u'OISF' # The version info for the project you're documenting, acts as replacement for