1 Star 0 Fork 0

NATS/official-images

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pr-urls.sh 901 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nats-io/official-images.git
[email protected]:nats-io/official-images.git
nats-io
official-images
official-images
master

搜索帮助