Skip to content

Commit

Permalink
Clone environments instead of adding them as submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipeTrost committed Oct 20, 2023
1 parent 01dc07d commit ec990e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/management-system/dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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
Expand Down

0 comments on commit ec990e3

Please sign in to comment.