mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
meson: docs: generate docs timestamp
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
4dc0e601c7
commit
c98eac9c59
@ -306,13 +306,6 @@ aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \
|
||||
$(top_srcdir)/scripts/genaclperms.py Makefile.am
|
||||
$(AM_V_GEN)$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/genaclperms.py $< > $@
|
||||
|
||||
timestamp="$(shell if test -n "$$SOURCE_DATE_EPOCH"; \
|
||||
then \
|
||||
date -u --date="@$$SOURCE_DATE_EPOCH"; \
|
||||
else \
|
||||
date -u; \
|
||||
fi)"
|
||||
|
||||
hvsupport.html: hvsupport.html.in
|
||||
|
||||
hvsupport.html.in: $(top_srcdir)/scripts/hvsupport.py $(api_DATA) \
|
||||
|
@ -29,6 +29,10 @@ docs_assets = [
|
||||
|
||||
install_data(docs_assets, install_dir: docs_html_dir)
|
||||
|
||||
docs_timestamp = run_command(
|
||||
python3_prog, meson_timestamp_prog.path(), env: runutf8
|
||||
).stdout().strip()
|
||||
|
||||
docs_api_generated = custom_target(
|
||||
'generate-api',
|
||||
output: [
|
||||
|
13
scripts/meson-timestamp.py
Executable file
13
scripts/meson-timestamp.py
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
|
||||
from datetime import datetime, timezone
|
||||
|
||||
timestamp = os.environ.get('SOURCE_DATE_EPOCH', None)
|
||||
timeformat = '%c %Z'
|
||||
|
||||
if timestamp:
|
||||
print(datetime.fromtimestamp(int(timestamp), tz=timezone.utc).strftime(timeformat))
|
||||
else:
|
||||
print(datetime.now(tz=timezone.utc).strftime(timeformat))
|
@ -23,6 +23,7 @@ scripts = [
|
||||
'meson-install-dirs.py',
|
||||
'meson-install-symlink.py',
|
||||
'meson-python.sh',
|
||||
'meson-timestamp.py',
|
||||
'mock-noinline.py',
|
||||
'prohibit-duplicate-header.py',
|
||||
'test-wrap-argv.py',
|
||||
|
Loading…
Reference in New Issue
Block a user