diff options
Diffstat (limited to 'util/build_scripts/dist-changelog.py')
-rwxr-xr-x | util/build_scripts/dist-changelog.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/util/build_scripts/dist-changelog.py b/util/build_scripts/dist-changelog.py new file mode 100755 index 0000000..c38fde3 --- /dev/null +++ b/util/build_scripts/dist-changelog.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 + +# External command, intended to be called with meson.add_dist_script() in meson.build + +# sys.argv[1] +# dist-changelog.py <root_source_dir> + +import os +import sys +import subprocess + +# Make a ChangeLog file for distribution. +cmd = [ + 'git', + '--git-dir=' + os.path.join(sys.argv[1], '.git'), + '--work-tree=' + sys.argv[1], + 'log', + '--no-merges', + '--date=short', + '--max-count=200', + '--pretty=tformat:%cd %an <%ae>%n%n %s%n%w(0,0,2)%+b', +] +logfile = open(os.path.join(os.getenv('MESON_DIST_ROOT'), 'ChangeLog'), mode='w') +result = subprocess.run(cmd, stdout=logfile) +logfile.close() +sys.exit(result.returncode) |