mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 15:57:17 +00:00
Rename functions not telling the truth in bootstrap script
This commit is contained in:
parent
81a930470a
commit
a6e8f4b898
@ -29,12 +29,12 @@ run()
|
|||||||
: > $LOGFILE
|
: > $LOGFILE
|
||||||
|
|
||||||
check_dependencies
|
check_dependencies
|
||||||
clone_repos_ask_ssh_or_https
|
clone_required_repos_ask_ssh_or_https
|
||||||
TAG="${BASEIMAGE_ONLY:-$(fetch_latest_tag)}"
|
TAG="${BASEIMAGE_ONLY:-$(fetch_latest_tag)}"
|
||||||
TAG=$TAG build_latest_baseimage
|
TAG=$TAG build_baseimage
|
||||||
|
|
||||||
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
|
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
|
||||||
TAG=$TAG pin_latest_baseimage
|
TAG=$TAG pin_baseimage
|
||||||
install_frontend_deps
|
install_frontend_deps
|
||||||
if [ "$TFWDEV" == "0" ]; then
|
if [ "$TFWDEV" == "0" ]; then
|
||||||
cleanup_repos
|
cleanup_repos
|
||||||
@ -44,8 +44,8 @@ run()
|
|||||||
delete_repos
|
delete_repos
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
|
|
||||||
echo
|
echo
|
||||||
|
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
|
||||||
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"
|
||||||
else
|
else
|
||||||
echo "Baseimage version ${BASEIMAGE_ONLY} built successfully!"
|
echo "Baseimage version ${BASEIMAGE_ONLY} built successfully!"
|
||||||
@ -88,22 +88,22 @@ check_dependencies()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
clone_repos_ask_ssh_or_https()
|
clone_required_repos_ask_ssh_or_https()
|
||||||
{
|
{
|
||||||
if [[ -z "$HTTPS_REMOTES" ]]; then
|
if [[ -z "$HTTPS_REMOTES" ]]; then
|
||||||
read -p "Repos are pulled over SSH by default. Should I use HTTPS instead? [y/N]" -r -t 5 || :
|
read -p "Repos are pulled over SSH by default. Should I use HTTPS instead? [y/N]" -r -t 5 || :
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^(y|Y|yes|Yes|YES)$ ]]; then
|
if [[ $REPLY =~ ^(y|Y|yes|Yes|YES)$ ]]; then
|
||||||
HTTPS_REMOTES=1 clone_repos
|
HTTPS_REMOTES=1 clone_required_repos
|
||||||
else
|
else
|
||||||
HTTPS_REMOTES=0 clone_repos
|
HTTPS_REMOTES=0 clone_required_repos
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
clone_repos
|
clone_required_repos
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
clone_repos()
|
clone_required_repos()
|
||||||
{
|
{
|
||||||
[[ "$HTTPS_REMOTES" == "1" ]] && remotebase="https://github.com/"
|
[[ "$HTTPS_REMOTES" == "1" ]] && remotebase="https://github.com/"
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ fetch_latest_tag()
|
|||||||
tail -n 1)"
|
tail -n 1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
pin_latest_baseimage()
|
pin_baseimage()
|
||||||
{
|
{
|
||||||
echo -n "Pinning TFW baseimage version... "
|
echo -n "Pinning TFW baseimage version... "
|
||||||
echo -n "which is ${TAG}... "
|
echo -n "which is ${TAG}... "
|
||||||
@ -142,7 +142,7 @@ pin_latest_baseimage()
|
|||||||
echo "Done!"
|
echo "Done!"
|
||||||
}
|
}
|
||||||
|
|
||||||
build_latest_baseimage()
|
build_baseimage()
|
||||||
{
|
{
|
||||||
echo -n "Building baseimage at ${TAG}... "
|
echo -n "Building baseimage at ${TAG}... "
|
||||||
pushd "$BASEIMAGE"
|
pushd "$BASEIMAGE"
|
||||||
|
@ -1 +1 @@
|
|||||||
URL=https://git.io/vxBfj SHA=237d0cce945574208784a21fa6c6fbb4f479e5ce60b1518b1fcc921d675d2861 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=d81057610588e16666251a4167f05841fc8b66ccd6988490c1a2d2deb6de8ffa 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