]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
userguide: dynamically determine copyright date
authorJuliana Fajardini <jufajardini@gmail.com>
Wed, 9 Feb 2022 19:46:24 +0000 (19:46 +0000)
committerVictor Julien <vjulien@oisf.net>
Wed, 27 Apr 2022 09:14:27 +0000 (11:14 +0200)
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

index baf4726e6238654da01f03facec7831d1ed43f9c..1474dd87afb83e108ecb777de4da1de3185db250 100644 (file)
@@ -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