mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 02:57:18 +00:00
Implement nicer handling of macOS compatibility aliases in hack folder
This commit is contained in:
parent
8a98fc05d5
commit
4234919902
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
shopt -s expand_aliases
|
||||||
|
|
||||||
TFW_POSTFIX=tutorial-framework
|
TFW_POSTFIX=tutorial-framework
|
||||||
BASEIMAGE=baseimage-${TFW_POSTFIX}
|
BASEIMAGE=baseimage-${TFW_POSTFIX}
|
||||||
@ -7,7 +8,7 @@ TEST=test-${TFW_POSTFIX}
|
|||||||
FRONTEND=frontend-${TFW_POSTFIX}
|
FRONTEND=frontend-${TFW_POSTFIX}
|
||||||
LOGFILE=/tmp/bootstrap_tfw.log
|
LOGFILE=/tmp/bootstrap_tfw.log
|
||||||
|
|
||||||
[ "$(uname)" == "Darwin" ] && sed_cmd="gsed" || sed_cmd="sed"
|
[ "$(uname)" == "Darwin" ] && alias sed="gsed" || :
|
||||||
|
|
||||||
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
|
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
|
||||||
cleanlog() { rm $LOGFILE; }
|
cleanlog() { rm $LOGFILE; }
|
||||||
@ -32,7 +33,7 @@ if [ -z "$TFWDEV" ]; then
|
|||||||
TFWURL=https://registry.hub.docker.com/v1/repositories/avatao/tutorial-framework/tags
|
TFWURL=https://registry.hub.docker.com/v1/repositories/avatao/tutorial-framework/tags
|
||||||
PYTHON_PARSEJSON="import sys, json; print json.load(sys.stdin)[-1]['name']"
|
PYTHON_PARSEJSON="import sys, json; print json.load(sys.stdin)[-1]['name']"
|
||||||
LATESTTAG="$(curl -fsSL ${TFWURL} | python -c "${PYTHON_PARSEJSON}")"
|
LATESTTAG="$(curl -fsSL ${TFWURL} | python -c "${PYTHON_PARSEJSON}")"
|
||||||
$sed_cmd -i "1 s/.*/&:${LATESTTAG}/" "${TEST}/solvable/Dockerfile"
|
sed -i "1 s/.*/&:${LATESTTAG}/" "${TEST}/solvable/Dockerfile"
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
|
||||||
rm -rf "${TEST}/.git"
|
rm -rf "${TEST}/.git"
|
||||||
|
@ -1 +1 @@
|
|||||||
URL=https://git.io/vxBfj SHA=835ef74695dfcc1003376a19f5e67a9363ab875e4360651aafe7a2597134cc0b 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=28cddbadc12416fd160590340010189368711612f5ddb9d18ad933ae0199da53 bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!'
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
shopt -s expand_aliases
|
||||||
|
|
||||||
[ "$(uname)" == "Darwin" ] && readlink_cmd="greadlink" || readlink_cmd="readlink"
|
[ "$(uname)" == "Darwin" ] && alias readlink="greadlink" || :
|
||||||
SCRIPT_DIR="$(dirname $($readlink_cmd -f $0))"
|
SCRIPT_DIR="$(dirname $(readlink -f $0))"
|
||||||
|
|
||||||
TAO_PATH="${TAO_PATH:-$SCRIPT_DIR/../..}"
|
TAO_PATH="${TAO_PATH:-$SCRIPT_DIR/../..}"
|
||||||
BASEIMAGE_REPO="${BASEIMAGE_REPO:-baseimage-tutorial-framework}"
|
BASEIMAGE_REPO="${BASEIMAGE_REPO:-baseimage-tutorial-framework}"
|
||||||
|
Loading…
Reference in New Issue
Block a user