mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Renamed several references from nf to ct
This commit is contained in:
@ -9,23 +9,23 @@
|
|||||||
|
|
||||||
function usage()
|
function usage()
|
||||||
{
|
{
|
||||||
echo "Usage: $0 [--nf-one|--qqq] [-q|--quiet] [-r|--is-for-release]"
|
echo "Usage: $0 [--ct-live|--qqq] [-q|--quiet] [-r|--is-for-release]"
|
||||||
echo "By default, all environments are set up. Give an option to just do nf-one or qqq."
|
echo "By default, all environments are set up. Give an option to just do ct-live or qqq."
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
DO_NF_ONE=0
|
DO_CT_LIVE=0
|
||||||
DO_QQQ=0
|
DO_QQQ=0
|
||||||
QUIET=0
|
QUIET=0
|
||||||
IS_FOR_RELEASE=0
|
IS_FOR_RELEASE=0
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
DO_NF_ONE=1
|
DO_CT_LIVE=1
|
||||||
DO_QQQ=1
|
DO_QQQ=1
|
||||||
else
|
else
|
||||||
for arg in ${@}; do
|
for arg in ${@}; do
|
||||||
if [ "$arg" == "--nf-one" ]; then
|
if [ "$arg" == "--ct-live" -o "$arg" == "--nf-one" ]; then
|
||||||
DO_NF_ONE=1
|
DO_CT_LIVE=1
|
||||||
elif [ "$arg" == "--qqq" ]; then
|
elif [ "$arg" == "--qqq" ]; then
|
||||||
DO_QQQ=1
|
DO_QQQ=1
|
||||||
elif [ "$arg" == "-q" -o "$arg" == "--quiet" ]; then
|
elif [ "$arg" == "-q" -o "$arg" == "--quiet" ]; then
|
||||||
@ -52,7 +52,7 @@ fi
|
|||||||
## locations of env files in 1password ##
|
## locations of env files in 1password ##
|
||||||
#########################################
|
#########################################
|
||||||
QQQ_OP_LOCATION="op://Development Environments/"
|
QQQ_OP_LOCATION="op://Development Environments/"
|
||||||
NUTRIFRESH_OP_LOCATION="op://NF-One-Development/"
|
CTL_OP_LOCATION="op://NF-One-Development/"
|
||||||
|
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
@ -60,7 +60,7 @@ NUTRIFRESH_OP_LOCATION="op://NF-One-Development/"
|
|||||||
##################################################
|
##################################################
|
||||||
QQQ_FRONTEND_MATERIAL_DASHBOARD_REPO_NAME="qqq-frontend-material-dashboard"
|
QQQ_FRONTEND_MATERIAL_DASHBOARD_REPO_NAME="qqq-frontend-material-dashboard"
|
||||||
QQQ_PROJECT_NAME="qqq"
|
QQQ_PROJECT_NAME="qqq"
|
||||||
NF_ONE_REPO_NAME="Nutrifresh-One"
|
CT_LIVE_REPO_NAME="Nutrifresh-One"
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
## qqq modules which need environments setup for them ##
|
## qqq modules which need environments setup for them ##
|
||||||
@ -97,12 +97,12 @@ function createDotEnv
|
|||||||
{
|
{
|
||||||
repoName=$1
|
repoName=$1
|
||||||
repoLocation=$2
|
repoLocation=$2
|
||||||
isNutrifreshOneRepo=$3
|
isColdTrackLiveRepo=$3
|
||||||
|
|
||||||
echo "${TAB}Changing directory to repository [$repoName] at [$repoLocation]..."
|
echo "${TAB}Changing directory to repository [$repoName] at [$repoLocation]..."
|
||||||
cd "${repoLocation}" || exit
|
cd "${repoLocation}" || exit
|
||||||
|
|
||||||
if [ "$isNutrifreshOneRepo" != "1" ]; then
|
if [ "$isColdTrackLiveRepo" != "1" ]; then
|
||||||
|
|
||||||
if [ "${repoName}" = "${QQQ_PROJECT_NAME}" ]; then
|
if [ "${repoName}" = "${QQQ_PROJECT_NAME}" ]; then
|
||||||
|
|
||||||
@ -125,9 +125,9 @@ function createDotEnv
|
|||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "${TAB}Creating NF .env..."
|
echo "${TAB}Creating CT-Live .env..."
|
||||||
rm -rf .env
|
rm -rf .env
|
||||||
op read "${NUTRIFRESH_OP_LOCATION}${repoName}/environment" > .env
|
op read "${CTL_OP_LOCATION}${repoName}/environment" > .env
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ function createDotEnv
|
|||||||
function setupRepoEnvironment
|
function setupRepoEnvironment
|
||||||
{
|
{
|
||||||
repoName=$1
|
repoName=$1
|
||||||
isNutrifreshOneRepo=$2
|
isColdTrackLiveRepo=$2
|
||||||
|
|
||||||
repoSearchRoot=${HOME}/git
|
repoSearchRoot=${HOME}/git
|
||||||
if [ "$IS_FOR_RELEASE" == "1" ]; then
|
if [ "$IS_FOR_RELEASE" == "1" ]; then
|
||||||
@ -185,7 +185,7 @@ function setupRepoEnvironment
|
|||||||
echo "Invalid git directory was given, quitting..." && exit 1
|
echo "Invalid git directory was given, quitting..." && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
createDotEnv ${repoName} ${repoLocation} $isNutrifreshOneRepo
|
createDotEnv ${repoName} ${repoLocation} $isColdTrackLiveRepo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -214,18 +214,18 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
##################
|
#################
|
||||||
### NUTRIFRESH ###
|
### COLDTRACK ###
|
||||||
##################
|
#################
|
||||||
if [ "$DO_NF_ONE" == "1" ]; then
|
if [ "$DO_CT_LIVE" == "1" ]; then
|
||||||
|
|
||||||
##################################################
|
###################################################
|
||||||
## make sure signed into right 1passord account ##
|
## make sure signed into right 1password account ##
|
||||||
##################################################
|
###################################################
|
||||||
echo
|
echo
|
||||||
echo "Signing in to Nutrifresh's 1password account..."
|
echo "Signing in to ColdTrack's 1password account..."
|
||||||
op signin --account team-nutrifreshservices.1password.com
|
op signin --account coldtrack.1password.com
|
||||||
setupRepoEnvironment ${NF_ONE_REPO_NAME} 1
|
setupRepoEnvironment ${CT_LIVE_REPO_NAME} 1
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user