(from_version, to_version)
Generate notes for Meson build next release.
Generate notes for Meson build next release.
Generate notes for Meson build next release .
def generate(from_version, to_version):
    '''
       Generate notes for Meson build next release.
    '''
    ofilename = f'Release-notes-for-{to_version}.md'
    with open(ofilename, 'w', encoding='utf-8') as ofile:
        ofile.write(RELNOTE_TEMPLATE.format(to_version, to_version))
        for snippetfile in glob('snippets/*.md'):
            snippet = open(snippetfile, encoding='utf-8').read()
            ofile.write(snippet)
            if not snippet.endswith('\n'):
                ofile.write('\n')
            ofile.write('\n')
            subprocess.check_call(['git', 'rm', snippetfile])
    subprocess.check_call(['git', 'add', ofilename])
    add_to_sitemap(from_version, to_version)
def generate ( from_version , to_version ) : ofilename = f'Release-notes-for-{to_version}.md' with open ( ofilename , 'w' , encoding = 'utf-8' ) as ofile : ofile . write ( RELNOTE_TEMPLATE . format ( to_version , to_version ) ) for snippetfile in glob ( 'snippets/*.md' ) : snippet = open ( snippetfile , encoding = 'utf-8' ) . read ( ) ofile . write ( snippet ) if not snippet . endswith ( '\n' ) : ofile . write ( '\n' ) ofile . write ( '\n' ) subprocess . check_call ( [ 'git' , 'rm' , snippetfile ] ) subprocess . check_call ( [ 'git' , 'add' , ofilename ] ) add_to_sitemap ( from_version , to_version )