in src/ab/utils/abt.py [0:0]
def replace(file_path, file_name, old, new):
if os.path.isfile(file_path):
if file_name == "doc.yaml" or "DS_Store" in file_name or file_name.endswith(".pyc"):
return
if file_name == "base.txt":
subprocess.run("sed -i '' 's/algorithm-base.git/algorithm-base.git@" + get_ab_version() + "/' " + file_path, shell=True)
subprocess.run("sed -i '' 's/" + old + "/" + new + "/' " + file_path, shell=True)
else:
if file_name == "docker":
return
for file_name in os.listdir(file_path):
replace(file_path + "/" + file_name, file_name, old, new)