mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-29 18:27:40 +02:00
cppformat -> fmt
This commit is contained in:
@ -138,7 +138,7 @@ if __name__ == '__main__':
|
||||
run = Runner()
|
||||
fmt_dir = os.path.join(workdir, 'fmt')
|
||||
branch = args.get('<branch>', 'master')
|
||||
run('git', 'clone', '-b', branch, 'git@github.com:cppformat/cppformat.git', fmt_dir)
|
||||
run('git', 'clone', '-b', branch, 'git@github.com:fmtlib/fmt.git', fmt_dir)
|
||||
|
||||
# Convert changelog from RST to GitHub-flavored Markdown and get the version.
|
||||
changelog = 'ChangeLog.rst'
|
||||
@ -170,8 +170,8 @@ if __name__ == '__main__':
|
||||
# Build the docs and package.
|
||||
run('cmake', '.')
|
||||
run('make', 'doc', 'package_source')
|
||||
site_dir = os.path.join(workdir, 'cppformat.github.io')
|
||||
run('git', 'clone', 'git@github.com:cppformat/cppformat.github.io.git', site_dir)
|
||||
site_dir = os.path.join(workdir, 'fmtlib.github.io')
|
||||
run('git', 'clone', 'git@github.com:fmtlib/fmtlib.github.io.git', site_dir)
|
||||
doc_dir = os.path.join(site_dir, version)
|
||||
shutil.copytree(os.path.join(fmt_dir, 'doc', 'html'), doc_dir,
|
||||
ignore=shutil.ignore_patterns('.doctrees', '.buildinfo'))
|
||||
@ -181,10 +181,10 @@ if __name__ == '__main__':
|
||||
|
||||
# Create a release on GitHub.
|
||||
run('git', 'push', 'origin', 'release', cwd=fmt_dir)
|
||||
r = requests.post('https://api.github.com/repos/cppformat/cppformat/releases',
|
||||
params={'access_token': os.getenv('CPPFORMAT_TOKEN')},
|
||||
r = requests.post('https://api.github.com/repos/fmtlib/fmt/releases',
|
||||
params={'access_token': os.getenv('FMT_TOKEN')},
|
||||
data=json.dumps({'tag_name': version, 'target_commitish': 'release',
|
||||
'body': changes, 'draft': True}))
|
||||
'body': changes, 'draft': True}))
|
||||
if r.status_code != 201:
|
||||
raise Exception('Failed to create a release ' + str(r))
|
||||
finally:
|
||||
|
Reference in New Issue
Block a user