mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
added primitive protocol switcher for submodules
This commit is contained in:
parent
8647088faf
commit
7d1bddd7e2
6 changed files with 75 additions and 10 deletions
|
@ -7,9 +7,11 @@ hr() { [ -t 0 ] && printf '\033[0;32m%*s\033[0m\n' "$(tput cols)" '' | tr ' ' '=
|
|||
|
||||
log() { hr; echo -e "\033[0;34m${1}\033[0m"; hr; }
|
||||
|
||||
error() { echo -e "\033[0;41m${1}\033[0m"; }
|
||||
|
||||
checkFile() {
|
||||
if [ ! -f "${1}" ]; then
|
||||
echo -e "\033[0;41m${1} does not exist!\033[0m"
|
||||
error "${1} does not exist!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
@ -37,7 +39,7 @@ checkFile "$PWD/src/server.ts"
|
|||
checkFile "$PWD/package.json"
|
||||
checkFile "$PWD/package-lock.json"
|
||||
if [ ! -f "${domainPath}" ]; then
|
||||
echo -e "\033[0;41m${domainPath} does not exist!\033[0m"
|
||||
error "${domainPath} does not exist!"
|
||||
echo "Please create it, and re-run this script."
|
||||
echo "Expected content: domain, ex.:'frylabs.net' (without http:// and /)"
|
||||
exit 1
|
||||
|
@ -62,6 +64,10 @@ cp -vrn ./defaultPublicFiles/* ./publicDirs/qminingPublic/
|
|||
# ------------------------------------------------------------------------------------
|
||||
# Git submodules
|
||||
# ------------------------------------------------------------------------------------
|
||||
if [ ! -z "$CLONE_WITH_HTTPS" ]; then
|
||||
./scripts/switchGitProtocol.sh "https"
|
||||
fi
|
||||
|
||||
log 'Updating / Cloning project'
|
||||
git pull || exit 1
|
||||
git submodule update --init --recursive --remote || exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue