Commit 0f90758e authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

Make hotdoc warn us about missing Since markers

Part-of: <gstreamer/gst-docs!97>
parent 26261a84
......@@ -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]
)
)
\ No newline at end of file
#!/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)
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment