Commit 9aa7705c authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

scripts: Rework the release tarball layout

Adding everything to a `GStreamer-doc-%(project_version)` folder.
Printing release output directory

Fixes gstreamer/gst-docs#35

Part-of: <gstreamer/gst-docs!92>
parent c984333d
......@@ -116,7 +116,7 @@ readme = configure_file(input: 'scripts/RELEASE_README.md',
run_target('release',
command: [find_program('scripts/release.py'),
gstreamer_doc.full_path(),
'GStreamer-doc-@0@.tar.xz'.format(meson.project_version()),
'GStreamer-doc-@0@'.format(meson.project_version()),
join_paths(meson.current_build_dir(), 'README.md')],
depends: [gstreamer_doc]
)
......@@ -6,12 +6,13 @@ import tarfile
if __name__ == "__main__":
files = sys.argv[1]
outname = sys.argv[2]
release_name = sys.argv[2]
readme = sys.argv[3]
outname = release_name + '.tar.xz'
print("Generating %s" % os.path.realpath(os.path.join(os.path.curdir, outname)), file=sys.stderr)
tar = tarfile.open(outname, 'w:xz')
os.chdir(files)
tar.add(os.path.curdir)
tar.add(files, release_name)
os.chdir(os.path.dirname(readme))
tar.add(os.path.basename(readme))
tar.add(os.path.basename(readme), os.path.join(release_name, os.path.basename(readme)))
tar.close()
\ No newline at end of file
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