更新时间:2023-11-28 18:55:28
您可以使用python json解析工具.
You can use python json parse tool.
下面是一个示例: curl https://gcr.io/v2/ $ {repo}/$ {image}/tags/list 2>/dev/null | python -c'导入sys,json;在json.load(sys.stdin)["tags"]'$ {version}
Below is an example: curl https://gcr.io/v2/${repo}/${image}/tags/list 2>/dev/null | python -c 'import sys, json; print sys.argv[1] in json.load(sys.stdin)["tags"]' ${version}
希望这会有所帮助!