1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-12 19:37:16 +00:00

Make latest tag detection work without DockerHub API

This commit is contained in:
Kristóf Tóth 2018-04-06 10:23:56 +02:00
parent 740110e8c5
commit 32fca7206c
2 changed files with 7 additions and 4 deletions

View File

@ -30,9 +30,12 @@ echo "Done!"
if [ -z "$TFWDEV" ]; then
echo -n "Pinning latest TFW baseimage version... "
TFWURL=https://registry.hub.docker.com/v1/repositories/avatao/tutorial-framework/tags
PYTHON_PARSEJSON="import sys, json; print json.load(sys.stdin)[-1]['name']"
LATESTTAG="$(curl -fsSL ${TFWURL} | python -c "${PYTHON_PARSEJSON}")"
LATESTTAG="$(git ls-remote --tags git@github.com:avatao-content/baseimage-tutorial-framework.git |
cut -f2 |
grep -oP '(?<=refs/tags/)\w+-\d{8}$' |
sort -t '-' -k2 |
tail -n 1)"
echo -n "which is ${LATESTTAG}... "
sed -i "1 s/.*/&:${LATESTTAG}/" "${TEST}/solvable/Dockerfile"
echo "Done!"

View File

@ -1 +1 @@
URL=https://git.io/vxBfj SHA=28cddbadc12416fd160590340010189368711612f5ddb9d18ad933ae0199da53 bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!'
URL=https://git.io/vxBfj SHA=a782b61bb9bbc28aaae174a0ed31aec35108a11068bc3f91ff33f43e29585ea7 bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!'