mirror of
https://github.com/fmtlib/fmt.git
synced 2025-09-25 22:20:54 +02:00
Fix mike invocation
This commit is contained in:
@@ -64,14 +64,18 @@ if len(args) > 0:
|
|||||||
if ret != 0 or version == 'dev':
|
if ret != 0 or version == 'dev':
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
current_doc_path = os.path.join(site_dir, version)
|
current_doc_path = os.path.join(site_dir, version)
|
||||||
os.makedirs(current_doc_path, exist_ok=True)
|
# mike stages files added by deploy for deletion for unclear reason,
|
||||||
redirect_page_path = os.path.join(current_doc_path, 'api.html')
|
# undo it.
|
||||||
with open(redirect_page_path, "w") as file:
|
ret = call(['git', 'reset', '--hard'], cwd=site_dir)
|
||||||
file.write(redirect_page)
|
if False:
|
||||||
ret = call(['git', 'add', redirect_page_path], cwd=site_dir)
|
os.makedirs(current_doc_path, exist_ok=True)
|
||||||
if ret != 0:
|
redirect_page_path = os.path.join(current_doc_path, 'api.html')
|
||||||
sys.exit(ret)
|
with open(redirect_page_path, "w") as file:
|
||||||
ret = call(['git', 'commit', '--amend', '--no-edit'], cwd=site_dir)
|
file.write(redirect_page)
|
||||||
|
ret = call(['git', 'add', redirect_page_path], cwd=site_dir)
|
||||||
|
if ret != 0:
|
||||||
|
sys.exit(ret)
|
||||||
|
ret = call(['git', 'commit', '--amend', '--no-edit'], cwd=site_dir)
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
elif not command.startswith('-'):
|
elif not command.startswith('-'):
|
||||||
args += ['-f', config_path]
|
args += ['-f', config_path]
|
||||||
|
Reference in New Issue
Block a user