in tools/build-release.py [0:0]
def setup_base_dir(release_top_path, helm_path, base_path, version):
print("setting up base dir for release artifacts, path: %s" % base_path)
if os.path.exists(base_path):
print("\nstaging dir already exist:\n%s\nplease remove it and retry\n" % base_path)
sys.exit(1)
# setup base dir
os.makedirs(base_path)
# copy top level artifacts
for file in os.listdir(release_top_path):
org = os.path.join(release_top_path, file)
dest = os.path.join(base_path, file)
print("copying files: %s ===> %s" % (org, dest))
shutil.copy2(org, dest)
# set the base Makefile version info
replace(os.path.join(base_path, "Makefile"), 'latest', version)
# set the base validate_cluster version info
replace(os.path.join(base_path, "validate_cluster.sh"), 'latest', version)
# update the version tags in the README
replace(os.path.join(base_path, "README.md"), '-latest', '-' + version)
# copy the helm charts
copy_helm_charts(helm_path, base_path, version)