Skip to content

Commit

Permalink
Merge branch 'develop' into feature/validateVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepsinn authored Jul 7, 2021
2 parents 8984ac7 + c427e34 commit 9b54a64
Show file tree
Hide file tree
Showing 22 changed files with 19,351 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .idea/dictionaries/m.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@types/node-fetch": "2.5.10",
"@types/q": "1.5.4",
"@types/remote-origin-url": "2.0.0",
"@types/rimraf": "2.0.4",
"@types/rimraf": "2.0.5",
"@types/underscore.string": "0.0.38",
"ansi-colors": "4.1.1",
"app-root-path": "3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_all_apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export RED='\033[0;31m'
export GREEN='\033[0;32m'
export NC='\033[0m' # No Color

SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}`
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}`
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER"
cd ${SCRIPT_FOLDER}
cd ..
Expand Down
6 changes: 3 additions & 3 deletions scripts/build_scripts/prepare_quantimodo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export RED='\033[0;31m'
export GREEN='\033[0;32m'
export NC='\033[0m' # No Color

SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}`
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}`
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER"
cd ${SCRIPT_FOLDER}
cd ../..
Expand Down Expand Up @@ -54,4 +54,4 @@ export APP_DESCRIPTION=Perfect your life
echo "Cannot use exclamation point in app description"

source ${INTERMEDIATE_PATH}/scripts/build_scripts/01_prepare_project.sh
ionic resources ios
ionic resources ios
2 changes: 1 addition & 1 deletion scripts/commit-build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck disable=SC2006
# shellcheck disable=SC2086
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}`
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}`
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER" && cd "${SCRIPT_FOLDER}" && cd .. && export IONIC_PATH="$PWD" && echo "IONIC_PATH is $IONIC_PATH"
BUILD_REPO=$IONIC_PATH/tmp/qm-web-build
set -xe
Expand Down
4 changes: 2 additions & 2 deletions scripts/cypress-docker-compose.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -e
called=$_ && [[ ${called} != $0 ]] && echo "${BASH_SOURCE[@]} is being sourced" || echo "${0} is being run"
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}` && cd ${SCRIPT_FOLDER} && cd .. && export REPO_DIR="$PWD"
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}` && cd ${SCRIPT_FOLDER} && cd .. && export REPO_DIR="$PWD"
export RELEASE_STAGE="${RELEASE_STAGE:-production}"

cp cypress/config/cypress.${RELEASE_STAGE}.json cypress.json
Expand Down
4 changes: 2 additions & 2 deletions scripts/cypress_install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
called=$_ && [[ ${called} != $0 ]] && echo "${BASH_SOURCE[@]} is being sourced" || echo "${0} is being run"
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}` && cd "${SCRIPT_FOLDER}" && cd .. && export REPO_DIR="$PWD"
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}` && cd "${SCRIPT_FOLDER}" && cd .. && export REPO_DIR="$PWD"
set +x
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' xvfb|grep "install ok installed")
if [[ "" == "$PKG_OK" ]]; then
Expand Down
14 changes: 14 additions & 0 deletions scripts/cypress_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=$(dirname "${PARENT_SCRIPT_PATH}")
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER" && cd "${SCRIPT_FOLDER}" && cd .. && export IONIC_PATH="$PWD" && echo "IONIC_PATH is $IONIC_PATH"
# shellcheck source=./log_start.sh
source "$IONIC_PATH"/scripts/log_start.sh "${BASH_SOURCE[0]}"
npm run cy:run
if [[ ! -f success-file ]] ; then
echo 'success-file is not there, aborting.'
exit 1
else
echo "success-file exists so running ghostinspector tests..."
fi
# shellcheck source=./log_end.sh
source "$IONIC_PATH"/scripts/log_end.sh
9 changes: 9 additions & 0 deletions scripts/ghost-inspector.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=$(dirname "${PARENT_SCRIPT_PATH}")
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER" && cd "${SCRIPT_FOLDER}" && cd .. && export IONIC_PATH="$PWD" && echo "IONIC_PATH is $IONIC_PATH"
# shellcheck source=./log_start.sh
source "$IONIC_PATH"/scripts/log_start.sh "${BASH_SOURCE[0]}"
set -xe
npm run test:ghostinspector
# shellcheck source=./log_end.sh
source "$IONIC_PATH"/scripts/log_end.sh
11 changes: 11 additions & 0 deletions scripts/heroku.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=$(dirname "${PARENT_SCRIPT_PATH}")
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER" && cd "${SCRIPT_FOLDER}" && cd .. && export IONIC_PATH="$PWD" && echo "IONIC_PATH is $IONIC_PATH"
# shellcheck source=./log_start.sh
source "$IONIC_PATH"/scripts/log_start.sh "${BASH_SOURCE[0]}"
set -xe
# shellcheck source=./no-root.sh
source "$SCRIPT_FOLDER"/no-root.sh
git push [email protected]:medimodo.git HEAD:master -f;
# shellcheck source=./log_end.sh
source "$IONIC_PATH"/scripts/log_end.sh
7 changes: 6 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash
# shellcheck disable=SC2006
# shellcheck disable=SC2086
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}`
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}`
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER" && cd "${SCRIPT_FOLDER}" && cd .. && export IONIC_PATH="$PWD" && echo "IONIC_PATH is $IONIC_PATH"
# shellcheck source=./log_start.sh
source $IONIC_PATH/scripts/log_start.sh "${BASH_SOURCE[0]}"
set -e
set -x
# shellcheck source=./no-root.sh
source "$SCRIPT_FOLDER"/no-root.sh
sudo chown -R $USER ~/.nvm || true
set +x
Expand All @@ -21,3 +24,5 @@ if [[ ${NODE_NAME} = "sonicmaster-ubuntu" ]];
npm rebuild node-sass;
fi
npm run configure:app
# shellcheck source=./log_start.sh
source $IONIC_PATH/scripts/log_end.sh "${BASH_SOURCE[0]}"
4 changes: 2 additions & 2 deletions scripts/ionic_install_with_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}`
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}`
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER"
cd ${SCRIPT_FOLDER}
cd ..
Expand Down
6 changes: 3 additions & 3 deletions scripts/jenkins-ios-build-all.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set +x
called=$_ && [[ ${called} != $0 ]] && echo "${BASH_SOURCE[@]} is being sourced" || echo "${0} is being run"
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}` && cd ${SCRIPT_FOLDER} && cd ..
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}` && cd ${SCRIPT_FOLDER} && cd ..

source ${SCRIPT_FOLDER}/ios_install_dependencies.sh

Expand All @@ -24,4 +24,4 @@ export APP_DISPLAY_NAME=QuantiModo
export QUANTIMODO_CLIENT_ID=quantimodo
if [[ ${BRANCH_NAME} = *"develop"* || ${BRANCH_NAME} = *"master"* ]]; then fastlane deploy; else gulp build-ios-app; fi

source ${SCRIPT_FOLDER}/save_last_build_workspace.sh
source ${SCRIPT_FOLDER}/save_last_build_workspace.sh
6 changes: 3 additions & 3 deletions scripts/jenkins-ios-build-one.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set +x
called=$_ && [[ ${called} != $0 ]] && echo "${BASH_SOURCE[@]} is being sourced" || echo "${0} is being run"
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}` && cd ${SCRIPT_FOLDER} && cd ..
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}` && cd ${SCRIPT_FOLDER} && cd ..
if [[ -z ${APP_IDENTIFIER} ]]; then echo "Please specify APP_IDENTIFIER env" && exit 1; fi
if [[ -z ${APP_DISPLAY_NAME} ]]; then echo "Please specify APP_DISPLAY_NAME env" && exit 1; fi
if [[ -z ${QUANTIMODO_CLIENT_ID} ]]; then echo "Please specify APP_DISPLAY_NAME env" && exit 1; fi
Expand All @@ -25,4 +25,4 @@ if [[ ${QUANTIMODO_CLIENT_ID} = *"moodimodoapp"* ]];
fi
cd platforms/ios/cordova && npm install ios-sim@latest && cd ../../..
ionic emulate ios
source ${SCRIPT_FOLDER}/save_last_build_workspace.sh
source ${SCRIPT_FOLDER}/save_last_build_workspace.sh
11 changes: 11 additions & 0 deletions scripts/log_end.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set +x
LOGGER_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPTS_FOLDER=$(dirname "${LOGGER_SCRIPT_PATH}")
cd "${SCRIPTS_FOLDER}" || exit 1
cd ..
export REPO_BASE_WITH_SLASH="$PWD/"
PARENT_SCRIPT_PATH=$1
REPLACEMENT=""
CALLER_SCRIPT_WITHOUT_REPO="${PARENT_SCRIPT_PATH/$REPO_BASE_WITH_SLASH/$REPLACEMENT}"
echo "====================================="
echo "DONE WITH $CALLER_SCRIPT_WITHOUT_REPO"
11 changes: 11 additions & 0 deletions scripts/log_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set +x
LOGGER_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPTS_FOLDER=$(dirname "${LOGGER_SCRIPT_PATH}")
cd "${SCRIPTS_FOLDER}" || exit 1
cd ..
PARENT_SCRIPT_PATH=$1
export REPO_BASE_WITH_SLASH="$PWD/"
REPLACEMENT=""
CALLER_SCRIPT_WITHOUT_REPO="${PARENT_SCRIPT_PATH/$REPO_BASE_WITH_SLASH/$REPLACEMENT}"
echo "STARTING $CALLER_SCRIPT_WITHOUT_REPO"
echo "====================================="
10 changes: 10 additions & 0 deletions scripts/mocha.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=$(dirname "${PARENT_SCRIPT_PATH}")
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER" && cd "${SCRIPT_FOLDER}" && cd .. && export IONIC_PATH="$PWD" && echo "IONIC_PATH is $IONIC_PATH"
# shellcheck source=./log_start.sh
source "$IONIC_PATH"/scripts/log_start.sh "${BASH_SOURCE[0]}"
set -xe
npm run types
npm run test:mocha
# shellcheck source=./log_end.sh
source "$IONIC_PATH"/scripts/log_end.sh
2 changes: 1 addition & 1 deletion scripts/nvm.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck disable=SC2086
# shellcheck disable=SC2006
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}`
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=`dirname ${PARENT_SCRIPT_PATH}`
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER" && cd "${SCRIPT_FOLDER}" && cd .. && export IONIC_PATH="$PWD" && echo "IONIC_PATH is $IONIC_PATH"
source "$SCRIPT_FOLDER"/no-root.sh
set +x
Expand Down
31 changes: 16 additions & 15 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#!/bin/bash
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=`dirname ${SCRIPT_PATH}`
#! /bin/bash
PARENT_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")" && SCRIPT_FOLDER=$(dirname "${PARENT_SCRIPT_PATH}")
echo "SCRIPT_FOLDER is $SCRIPT_FOLDER" && cd "${SCRIPT_FOLDER}" && cd .. && export IONIC_PATH="$PWD" && echo "IONIC_PATH is $IONIC_PATH"
# shellcheck source=./log_start.sh
source "$IONIC_PATH"/scripts/log_start.sh "${BASH_SOURCE[0]}"
set -xe
sudo bash "${SCRIPT_FOLDER}"/output_commit_message_and_env.sh
# shellcheck source=./no-root.sh
source "$SCRIPT_FOLDER"/no-root.sh

set -e
npm run types
npm run test:mocha
# shellcheck source=./mocha.sh
source "$SCRIPT_FOLDER"/mocha.sh
if [[ ${GIT_BRANCH} = "origin/develop" ]]; then bash "${SCRIPT_FOLDER}"/commit-build.sh && exit 0; fi
if [[ ${GIT_BRANCH} != *"feature"* && ${GIT_BRANCH} != *"renovate"* ]]; then exit 0; fi
git push [email protected]:medimodo.git HEAD:master -f;
# shellcheck source=./heroku.sh
source "${SCRIPT_FOLDER}"/heroku.sh
# shellcheck source=./cypress_install.sh
source "${SCRIPT_FOLDER}"/cypress_install.sh
npm run cy:run
if [[ ! -f success-file ]] ; then
echo 'success-file is not there, aborting.'
exit 1
else
echo "success-file exists so running ghostinspector tests..."
fi
npm run test:ghostinspector
# shellcheck source=./cypress_run.sh
source "${SCRIPT_FOLDER}"/cypress_run.sh
# shellcheck source=./ghost-inspector.sh
source "${SCRIPT_FOLDER}"/ghost-inspector.sh
# shellcheck source=./log_end.sh
source "$IONIC_PATH"/scripts/log_end.sh
Loading

0 comments on commit 9b54a64

Please sign in to comment.