代码拉取完成,页面将自动刷新
#!/usr/bin/env bash
set -Eeuo pipefail
#
# usage:
# $ ./pr-urls.sh PR-NUMBER
# $ ./pr-urls.sh PR-NUMBER IMAGE1 IMAGE2:TAG1 IMAGE3:TAG2
#
# $ ./pr-urls.sh 12072
# $ ./pr-urls.sh 12072 hello-world:linux
# $ ./pr-urls.sh 12072 | xargs -rt bashbrew build
# $ ./pr-urls.sh 12072 | xargs -rt bashbrew list --uniq
# $ ./pr-urls.sh 12072 | xargs -rt bashbrew list --uniq | xargs -rt ./test/run.sh
#
# (rough replacement for the old "test-pr.sh" script and its associated complexity)
#
pr="$1"
shift
patch="$(wget -qO- "https://github.com/docker-library/official-images/pull/$pr.patch")"
commit="$(grep <<<"$patch" -oE '^From [0-9a-f]+ ' | tail -1 | cut -d' ' -f2)"
if [ "$#" -eq 0 ]; then
files="$(grep <<<"$patch" -oE '^[+]{3} b/library/.+' | cut -d/ -f3 | sort -u)"
set -- $files
fi
for file; do
echo "https://github.com/docker-library/official-images/raw/$commit/library/$file"
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。