mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 22:27:17 +00:00
Reorder stuff in bootstrap script for logical consistency
This commit is contained in:
parent
6679a3b1ef
commit
ab88856651
@ -37,6 +37,10 @@ run()
|
|||||||
echo "You can build & start TFW by executing the command: ${TEST}/hack/tfw.sh start"
|
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()
|
check_dependencies()
|
||||||
{
|
{
|
||||||
dependencies=("git" "docker" "yarn" "ng")
|
dependencies=("git" "docker" "yarn" "ng")
|
||||||
@ -53,10 +57,6 @@ check_dependencies()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
|
|
||||||
cleanlog() { rm $LOGFILE; }
|
|
||||||
err_cleanup() { cd "$BASEDIR" && rm -rf "$BASEIMAGE" "$FRONTEND" "$TEST"; }
|
|
||||||
|
|
||||||
clone_repos()
|
clone_repos()
|
||||||
{
|
{
|
||||||
echo -n "Cloning TFW repositories... "
|
echo -n "Cloning TFW repositories... "
|
||||||
@ -75,6 +75,15 @@ install_frontend_deps()
|
|||||||
echo "Done!"
|
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()
|
pin_latest_baseimage()
|
||||||
{
|
{
|
||||||
echo -n "Pinning latest TFW baseimage version... "
|
echo -n "Pinning latest TFW baseimage version... "
|
||||||
@ -93,15 +102,6 @@ build_latest_baseimage()
|
|||||||
echo "Done!"
|
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()
|
cleanup_repos()
|
||||||
{
|
{
|
||||||
rm -rf "${BASEIMAGE}"
|
rm -rf "${BASEIMAGE}"
|
||||||
|
@ -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!'
|
||||||
|
Loading…
Reference in New Issue
Block a user