3 # External command, intended to be called with meson.add_dist_script() in meson.build
6 # dist-changelog.py <root_source_dir>
12 # Make a ChangeLog file for distribution.
15 '--git-dir=' + os.path.join(sys.argv[1], '.git'),
16 '--work-tree=' + sys.argv[1],
21 '--pretty=tformat:%cd %an <%ae>%n%n %s%n%w(0,0,2)%+b',
23 with open(os.path.join(os.getenv('MESON_DIST_ROOT'), 'ChangeLog'), mode='w') as logfile:
24 sys.exit(subprocess.run(cmd, stdout=logfile).returncode)