diff --git a/Helper/defineSubtrees.sh b/Helper/defineSubtrees.sh new file mode 100644 index 0000000..4f271a9 --- /dev/null +++ b/Helper/defineSubtrees.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +git remote add -f Web https://github.com/Orange-Management/Web.git +git remote add -f phpOMS https://github.com/Orange-Management/phpOMS.git +git remote add -f jsOMS https://github.com/Orange-Management/jsOMS.git +git remote add -f Build https://github.com/Orange-Management/Build.git +git remote add -f Tests https://github.com/Orange-Management/Tests.git +git remote add -f Model https://github.com/Orange-Management/Model.git +git remote add -f Modules https://github.com/Orange-Management/Modules.git +git remote add -f Developer-Guide https://github.com/Orange-Management/Developer-Guide.git +git remote add -f Documentation https://github.com/Orange-Management/Documentation.git +git remote add -f Socket https://github.com/Orange-Management/Socket.git +git remote add -f Console https://github.com/Orange-Management/Console.git +git remote add -f cssOMS https://github.com/Orange-Management/cssOMS.git \ No newline at end of file diff --git a/Helper/push.sh b/Helper/push.sh new file mode 100644 index 0000000..76204d8 --- /dev/null +++ b/Helper/push.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +git push +git subtree push --prefix Web Web develop +git subtree push --prefix Socket Socket develop +git subtree push --prefix Console Console develop +git subtree push --prefix phpOMS phpOMS develop +git subtree push --prefix jsOMS jsOMS develop +git subtree push --prefix Tests Tests develop +git subtree push --prefix Model Model develop +git subtree push --prefix Modules Modules develop +git subtree push --prefix Build Build develop +git subtree push --prefix Developer-Guide Developer-Guide develop +git subtree push --prefix Documentation Documentation develop +git subtree push --prefix cssOMS cssOMS develop \ No newline at end of file diff --git a/config.sh b/config.sh index 5b4330b..5b62459 100644 --- a/config.sh +++ b/config.sh @@ -20,24 +20,6 @@ DB_PASSWORD="123456" # Git variables GITHUB_URL[0]="https://github.com/Orange-Management/Orange-Management.git" -GITHUB_URL[1]="https://github.com/Orange-Management/Console.git" -GITHUB_URL[2]="https://github.com/Orange-Management/cssOMS.git" -GITHUB_URL[3]="https://github.com/Orange-Management/Demo.git" -GITHUB_URL[4]="https://github.com/Orange-Management/Docs.git" -GITHUB_URL[5]="https://github.com/Orange-Management/Documentation.git" -GITHUB_URL[6]="https://github.com/Orange-Management/Install.git" -GITHUB_URL[7]="https://github.com/Orange-Management/jsOMS.git" -GITHUB_URL[8]="https://github.com/Orange-Management/Model.git" -GITHUB_URL[9]="https://github.com/Orange-Management/Modules.git" -GITHUB_URL[10]="https://github.com/Orange-Management/phpOMS.git" -GITHUB_URL[11]="https://github.com/Orange-Management/Release.git" -GITHUB_URL[12]="https://github.com/Orange-Management/Resources.git" -GITHUB_URL[13]="https://github.com/Orange-Management/Socket.git" -GITHUB_URL[14]="https://github.com/Orange-Management/Tests.git" -GITHUB_URL[15]="https://github.com/Orange-Management/Web.git" -GITHUB_URL[16]="https://github.com/Orange-Management/Website.git" -GITHUB_URL[17]="https://github.com/Orange-Management/GitDashboard.git" -GITHUB_URL[18]="https://github.com/Orange-Management/Documentor.git" GIT_BRANCH="develop" diff --git a/setup.sh b/setup.sh index 7b8a749..c55a8dc 100644 --- a/setup.sh +++ b/setup.sh @@ -9,7 +9,7 @@ mkdir -p ${ROOT_PATH} rm -r -f ${INSPECTION_PATH} mkdir -p ${INSPECTION_PATH} -# Handling git +# Create git repositories c=0; for i in "${GITHUB_URL[@]}" do @@ -27,7 +27,7 @@ do c=$((c+1)) done -# Creating directories +# Creating directories for inspection mkdir -p ${INSPECTION_PATH}/logs mkdir -p ${INSPECTION_PATH}/Framework/logs mkdir -p ${INSPECTION_PATH}/Framework/metrics @@ -52,8 +52,11 @@ mkdir -p ${INSPECTION_PATH}/Test/Js chmod -R 777 ${ROOT_PATH} cd ${ROOT_PATH} -touch private.php +# Add subtree remotes +. Helper/defineSubtrees.sh + +# Setup tools for inspection if [ ! -d "$TOOLS_PATH" ]; then mkdir -p ${TOOLS_PATH} @@ -77,7 +80,5 @@ if [ ! -d "$TOOLS_PATH" ]; then php composer.phar install fi +# Link vendor ln -s ${TOOLS_PATH}/vendor ${ROOT_PATH}/vendor - -# Installing tools -[[ $(jsonlint -h) != *"Usage: jsonlint"* ]] && npm install jsonlint -g