mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
do not set lto=true in release-script
This commit is contained in:
committed by
holger krekel
parent
9286ea8174
commit
80a1884f00
@@ -26,8 +26,7 @@ def read_toml_version(relpath):
|
|||||||
raise ValueError("no version found in {}".format(relpath))
|
raise ValueError("no version found in {}".format(relpath))
|
||||||
|
|
||||||
|
|
||||||
def replace_toml_version_and_lto(relpath, newversion):
|
def replace_toml_version(relpath, newversion):
|
||||||
lto_rex = re.compile(r'#?\s*lto =.*')
|
|
||||||
p = pathlib.Path(relpath)
|
p = pathlib.Path(relpath)
|
||||||
assert p.exists()
|
assert p.exists()
|
||||||
tmp_path = str(p) + "_tmp"
|
tmp_path = str(p) + "_tmp"
|
||||||
@@ -38,10 +37,6 @@ def replace_toml_version_and_lto(relpath, newversion):
|
|||||||
print("{}: set version={}".format(relpath, newversion))
|
print("{}: set version={}".format(relpath, newversion))
|
||||||
f.write('version = "{}"\n'.format(newversion))
|
f.write('version = "{}"\n'.format(newversion))
|
||||||
else:
|
else:
|
||||||
m = lto_rex.match(line)
|
|
||||||
if m:
|
|
||||||
print("{}: setting lto = true".format(relpath))
|
|
||||||
line = "lto = true\n"
|
|
||||||
f.write(line)
|
f.write(line)
|
||||||
os.rename(tmp_path, str(p))
|
os.rename(tmp_path, str(p))
|
||||||
|
|
||||||
@@ -76,8 +71,8 @@ def main():
|
|||||||
else:
|
else:
|
||||||
raise SystemExit("CHANGELOG.md contains no entry for version: {}".format(newversion))
|
raise SystemExit("CHANGELOG.md contains no entry for version: {}".format(newversion))
|
||||||
|
|
||||||
replace_toml_version_and_lto("Cargo.toml", newversion)
|
replace_toml_version("Cargo.toml", newversion)
|
||||||
replace_toml_version_and_lto("deltachat-ffi/Cargo.toml", newversion)
|
replace_toml_version("deltachat-ffi/Cargo.toml", newversion)
|
||||||
|
|
||||||
print("running cargo check")
|
print("running cargo check")
|
||||||
subprocess.call(["cargo", "check"])
|
subprocess.call(["cargo", "check"])
|
||||||
|
|||||||
Reference in New Issue
Block a user