1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-12-05 02:11:32 +00:00

Reorder stuff in bootstrap script for logical consistency

This commit is contained in:
Kristóf Tóth 2018-04-28 11:26:48 +02:00
parent 6679a3b1ef
commit ab88856651
2 changed files with 14 additions and 14 deletions

View File

@ -37,6 +37,10 @@ run()
echo "You can build & start TFW by executing the command: ${TEST}/hack/tfw.sh start"
}
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
cleanlog() { rm $LOGFILE; }
err_cleanup() { cd "$BASEDIR" && rm -rf "$BASEIMAGE" "$FRONTEND" "$TEST"; }
check_dependencies()
{
dependencies=("git" "docker" "yarn" "ng")
@ -53,10 +57,6 @@ check_dependencies()
fi
}
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
cleanlog() { rm $LOGFILE; }
err_cleanup() { cd "$BASEDIR" && rm -rf "$BASEIMAGE" "$FRONTEND" "$TEST"; }
clone_repos()
{
echo -n "Cloning TFW repositories... "
@ -75,6 +75,15 @@ install_frontend_deps()
echo "Done!"
}
fetch_latest_tag()
{
echo -n "$(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)"
}
pin_latest_baseimage()
{
echo -n "Pinning latest TFW baseimage version... "
@ -93,15 +102,6 @@ build_latest_baseimage()
echo "Done!"
}
fetch_latest_tag()
{
echo -n "$(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)"
}
cleanup_repos()
{
rm -rf "${BASEIMAGE}"

View File

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