From ec990e3a6fd26b738b84797f74fd18449b590285 Mon Sep 17 00:00:00 2001 From: Felipe Trost Date: Fri, 20 Oct 2023 16:35:28 +0200 Subject: [PATCH] Clone environments instead of adding them as submodule --- src/management-system/dev-server.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/management-system/dev-server.ts b/src/management-system/dev-server.ts index 0acdfeb80..921aaecba 100644 --- a/src/management-system/dev-server.ts +++ b/src/management-system/dev-server.ts @@ -47,7 +47,8 @@ const startManagementSystem = () => { // check if start with or without IAM if (process.env.MODE === 'iam') { - const path = './src/backend/server/environment-configurations/development/config_iam.json'; + const environmentsFolder = './src/backend/server/environment-configurations/'; + const path = environmentsFolder + 'development/config_iam.json'; // if submodule doesn't exist, add environment submodule if (!fs.existsSync(path)) { @@ -60,8 +61,10 @@ if (process.env.MODE === 'iam') { ); execSync( - 'cd ./src/backend/server/ && git submodule add --force https://github.com/PROCEED-Labs/environments environment-configurations', + 'cd ./src/backend/server/ && git clone https://github.com/PROCEED-Labs/environments environment-configurations', ); + + fs.rmSync(environmentsFolder + '.git', { recursive: true, force: true }); } // start docker container in separate subprocess