From: Juliana Fajardini Date: Wed, 9 Feb 2022 19:46:24 +0000 (+0000) Subject: userguide: dynamically determine copyright date X-Git-Tag: suricata-6.0.6~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47243c0839475529d987d2ec24189f5061f879b1;p=thirdparty%2Fsuricata.git 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) --- 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