def update_release(channel):
"""
Update release manifests.
"""
if not os.path.exists("cluster.yml"):
error("no cluster.yml found. Did you configure?")
with open("cluster.yml") as fp:
config = yaml.load(fp.read())
if channel is None:
channel = config["release"]["channel"]
current_version = config["release"]["version"]
configure.release(config, channel)
if current_version == config["release"]["version"]:
click.echo("No updates available for {} channel".format(channel))
sys.exit(0)
with open("cluster.yml", "w") as fp:
fp.write(yaml.safe_dump(config, default_flow_style=False))
click.echo("Updated config to {} in {} channel".format(config["release"]["version"], config["release"]["channel"]))
评论列表
文章目录