Use BASEIMAGE variable in latest tag detection

This commit is contained in:
Kristóf Tóth 2018-04-14 10:10:02 +02:00
parent 25cedbd3d4
commit 017e7d0e26
2 changed files with 6 additions and 6 deletions

View File

@ -31,16 +31,16 @@ echo "Done!"
if [ -z "$TFWDEV" ]; then
echo -n "Pinning latest TFW baseimage version... "
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 |
LATESTTAG="$(git ls-remote --tags git@github.com:avatao-content/${BASEIMAGE}.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!"
echo -n "Building baseimage... "
echo -n "Building baseimage at ${LATESTTAG}... "
cd "$BASEIMAGE"
git checkout "$LATESTTAG" >> $LOGFILE 2>&1
cd ..

View File

@ -1 +1 @@
URL=https://git.io/vxBfj SHA=d25b55064dcecaf76e09919bfaae4bc321ec3c4c5c8e868001973af024a41d68 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=dcc634915977f14e32a65d0601ebbfe4cc1cd46b77a1b1de7dd157744e616851 bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!'