mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
Make hotdoc warn us about missing Since markers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/97>
This commit is contained in:
parent
26261a84b3
commit
0f90758ead
3 changed files with 62114 additions and 5 deletions
|
@ -105,6 +105,7 @@ gstreamer_doc = hotdoc.generate_doc('GStreamer',
|
|||
devhelp_online: 'https://gstreamer.freedesktop.org/documentation/',
|
||||
build_always_stale: true,
|
||||
edit_on_github_repository: 'https://gitlab.freedesktop.org/gstreamer/gst-docs/',
|
||||
previous_symbol_index: join_paths(meson.current_source_dir(), 'symbols', 'symbol_index.json'),
|
||||
)
|
||||
|
||||
cdata = configuration_data()
|
||||
|
@ -116,7 +117,7 @@ readme = configure_file(input: 'scripts/RELEASE_README.md',
|
|||
run_target('release',
|
||||
command: [find_program('scripts/release.py'),
|
||||
gstreamer_doc.full_path(),
|
||||
'gstreamer-docs-@0@'.format(meson.project_version()),
|
||||
join_paths(meson.current_build_dir(), 'README.md')],
|
||||
meson.project_version(),
|
||||
meson.current_build_dir()],
|
||||
depends: [gstreamer_doc]
|
||||
)
|
||||
)
|
|
@ -1,15 +1,47 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tarfile
|
||||
|
||||
|
||||
HERE = os.path.realpath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
files = sys.argv[1]
|
||||
release_name = sys.argv[2]
|
||||
readme = sys.argv[3]
|
||||
version = sys.argv[2]
|
||||
release_name = 'gstreamer-doc-' + sys.argv[2]
|
||||
builddir = sys.argv[3]
|
||||
readme = os.path.join(builddir, "README.md")
|
||||
outname = release_name + '.tar.xz'
|
||||
|
||||
version_v = version.split('.')
|
||||
version_major_minor = version_v[0] + '.' + version_v[1]
|
||||
symbols_index_dir = os.path.join(HERE, '..', 'symbols')
|
||||
symbols_version = '-1'
|
||||
symbols_version_file = os.path.join(symbols_index_dir, 'symbols_version.txt')
|
||||
try:
|
||||
with open(symbols_version_file) as sv:
|
||||
symbols_version = sv.read()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
if symbols_version != version_major_minor:
|
||||
print("Updating symbols to new major version %s" % version_major_minor, file=sys.stderr)
|
||||
|
||||
symbol_index_file = os.path.join(symbols_index_dir, 'symbol_index.json')
|
||||
shutil.copyfile(os.path.join(builddir, "hotdoc-private-GStreamer", "symbol_index.json"),
|
||||
symbol_index_file)
|
||||
with open(symbols_version_file, 'w') as sv:
|
||||
sv.write(version_major_minor)
|
||||
print("NOTE: YOU SHOULD COMMIT THE FOLLOWING FILES BEFORE PUBLISHING THE RELEASE:", file=sys.stderr)
|
||||
print(" - " + symbol_index_file, file=sys.stderr)
|
||||
print(" - " + symbols_version_file, file=sys.stderr)
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
print("Generating %s" % os.path.realpath(os.path.join(os.path.curdir, outname)), file=sys.stderr)
|
||||
tar = tarfile.open(outname, 'w:xz')
|
||||
tar.add(files, release_name)
|
||||
|
|
62076
symbols/symbol_index.json
Normal file
62076
symbols/symbol_index.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue