diff options
author | Magnus Hagander | 2022-06-20 18:29:36 +0000 |
---|---|---|
committer | Magnus Hagander | 2022-06-20 18:32:05 +0000 |
commit | e6f529dd4eb2cffdada4855ee55037e4a414c96c (patch) | |
tree | cf03a800a3cf4941315f2bd558367db2f4473dc3 /tools/docs/docload.py | |
parent | e9f445444433b9c18deef97b32d549006f4dee4d (diff) |
Store the git hash of developer docs loaded
This will require some further updates on the loading side of things
before it's fully valid, but for now track and show a link to the git
hash used to build developer docs *if* one is specified.
We only track it for devel (because releases have release numbers) and
we only show it in the cases where we would already show the loading
time.
Diffstat (limited to 'tools/docs/docload.py')
-rwxr-xr-x | tools/docs/docload.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/docs/docload.py b/tools/docs/docload.py index 1807e214..4eff9858 100755 --- a/tools/docs/docload.py +++ b/tools/docs/docload.py @@ -104,6 +104,8 @@ parser.add_option("-q", "--quiet", action="store_true", dest="quiet", help="Run quietly (no output at all)") parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="Run verbosely") +parser.add_option("-g", "--git", type=str, + help="Specify git hash used to load") (options, args) = parser.parse_args() if len(args) != 2: @@ -233,7 +235,15 @@ if not quiet: if numchanges > 0: # Update the docs loaded timestamp - curs.execute("UPDATE core_version SET docsloaded=CURRENT_TIMESTAMP WHERE tree=%(v)s", {'v': ver}) + if ver == "0" and options.git: + githash = options.git + else: + githash = '' + + curs.execute("UPDATE core_version SET docsloaded=CURRENT_TIMESTAMP, docsgit=%(git)s WHERE tree=%(v)s", { + 'v': ver, + 'git': githash, + }) # Issue varnish purge for all docs of this version if ver == "0": |