vsts-agent-docker/tags-md.sh

19 строки
532 B
Bash
Исходник Постоянная ссылка Обычный вид История

2016-10-06 21:08:29 +03:00
#!/bin/bash
2016-10-22 00:21:25 +03:00
set -e
2016-10-06 21:08:29 +03:00
cd "$(dirname $0)"
GIT_COMMIT=${1:-$(git rev-parse HEAD)}
GITHUB_BASE_URL="https://github.com/microsoft/vsts-agent-docker/blob/$GIT_COMMIT"
2016-10-06 21:08:29 +03:00
LATEST_TAG=$(cat latest.tag)
while read dir; do
DOCKER_TAG=${dir//\//-}
DOCKERFILE_URL=$dir/Dockerfile
2016-10-06 21:08:29 +03:00
MD="[\`$DOCKER_TAG\`]($GITHUB_BASE_URL/$DOCKERFILE_URL)"
if [ "$DOCKER_TAG" == "$LATEST_TAG" ]; then
MD="$MD, [\`latest\`]($GITHUB_BASE_URL/$DOCKERFILE_URL)"
fi
echo "- $MD [($DOCKERFILE_URL)]($GITHUB_BASE_URL/$DOCKERFILE_URL)"
done < <(./dirs.sh $1)