Skip to content

Commit

Permalink
fix(docs): Change year in copyright footer to current year (#3079)
Browse files Browse the repository at this point in the history
* fix: Change year in copyright to current year
* fix: prevent modification by sphinx
  • Loading branch information
comawill authored Feb 13, 2023
1 parent 7ff8472 commit c15881c
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,17 @@
# 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 sys
# sys.path.insert(0, os.path.abspath('.'))
import datetime
import os
import requests

# unset SOURCE_DATE_EPOCH to aviod side effects caused by sphinx
del os.environ['SOURCE_DATE_EPOCH']

# -- Project information -----------------------------------------------------

project = 'Wire'
author = 'Wire Swiss GmbH'
# Since nix has an old timestamp it operates under for reproducability, get
# current date from the internet.
try:
r = requests.get("https://worldtimeapi.org/api/timezone/Europe/Berlin").json()
today_year = r['datetime'][:4]
# the first commit of wire-docs was in 2019.
copyright = f'2019 - {today_year}, ' + author
except:
print("Error in getting online date, fallback to potentially out-of-date year")
copyright = f'2019 - 2022, Wire Swiss GmbH'
copyright = f'2019 - 2023, Wire Swiss GmbH'
version = '0.0.4'
# the 'release' variable is used in latex-based PDF generation
release = version
Expand Down

0 comments on commit c15881c

Please sign in to comment.