mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fixup utralib extensions
This commit is contained in:
parent
64981a4bbd
commit
efa8baf6f2
1 changed files with 13 additions and 8 deletions
21
publish.py
21
publish.py
|
|
@ -138,6 +138,11 @@ def bump_version(semver):
|
||||||
retver += "."
|
retver += "."
|
||||||
return retver
|
return retver
|
||||||
|
|
||||||
|
def merge_two_dicts(x, y):
|
||||||
|
z = x.copy()
|
||||||
|
z.update(y)
|
||||||
|
return z
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Update and publish crates")
|
parser = argparse.ArgumentParser(description="Update and publish crates")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|
@ -153,30 +158,30 @@ def main():
|
||||||
|
|
||||||
cratelist = {}
|
cratelist = {}
|
||||||
if args.xous_bump:
|
if args.xous_bump:
|
||||||
cratelist += CRATES
|
cratelist = merge_two_dicts(cratelist, CRATES)
|
||||||
if args.utralib_bump:
|
if args.utralib_bump:
|
||||||
cratelist += UTRA_CRATES
|
cratelist = merge_two_dicts(cratelist, UTRA_CRATES)
|
||||||
if not args.xous_bump: # most Xous crates are also affected by this, so they need a bump as well
|
if not args.xous_bump: # most Xous crates are also affected by this, so they need a bump as well
|
||||||
cratelist += CRATES
|
cratelist = merge_two_dicts(cratelist, CRATES)
|
||||||
|
|
||||||
if args.xous_bump or args.utralib_bump:
|
if args.xous_bump or args.utralib_bump:
|
||||||
cargo_toml_paths = []
|
cargo_toml_paths = []
|
||||||
for path in Path('.').rglob('Cargo.toml'):
|
for path in Path('.').rglob('Cargo.toml'):
|
||||||
if 'target' not in str(path):
|
if 'target' not in str(path):
|
||||||
not_core_path = True
|
not_core_path = True
|
||||||
for editpath in CRATES.values():
|
for editpath in cratelist.values():
|
||||||
if editpath in str(Path(path)).replace('\\', '/'): # fix windows paths
|
if editpath in str(Path(path)).replace('\\', '/'): # fix windows paths
|
||||||
not_core_path = False
|
not_core_path = False
|
||||||
if not_core_path:
|
if not_core_path:
|
||||||
cargo_toml_paths += [path]
|
cargo_toml_paths += [path]
|
||||||
|
|
||||||
#import pprint
|
# import pprint
|
||||||
#pp = pprint.PrettyPrinter(indent=2)
|
# pp = pprint.PrettyPrinter(indent=2)
|
||||||
#pp.pprint(cargo_toml_paths)
|
# pp.pprint(cargo_toml_paths)
|
||||||
|
|
||||||
patches = []
|
patches = []
|
||||||
# extract the versions of crates to patch
|
# extract the versions of crates to patch
|
||||||
for (crate, path) in CRATES.items():
|
for (crate, path) in cratelist.items():
|
||||||
#print("extracting {}".format(path))
|
#print("extracting {}".format(path))
|
||||||
patchinfo = PatchInfo(path + '/Cargo.toml', cratelist, crate)
|
patchinfo = PatchInfo(path + '/Cargo.toml', cratelist, crate)
|
||||||
if not patchinfo.get_version():
|
if not patchinfo.get_version():
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue