Read from .gitmodules instead of folders
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
parent
d546f4878d
commit
c5a79140dd
11
.drone.yml
11
.drone.yml
|
@ -50,7 +50,16 @@ steps:
|
||||||
image: plugins/git
|
image: plugins/git
|
||||||
settings:
|
settings:
|
||||||
recursive: true
|
recursive: true
|
||||||
submodule_override: {}
|
submodule_override:
|
||||||
|
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||||
|
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||||
|
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||||
|
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||||
|
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||||
|
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||||
|
backend-pictures: 'https://git.makerforce.io/beep/backend-pictures.git'
|
||||||
|
backend-permissions: 'https://git.makerforce.io/beep/backend-permissions.git'
|
||||||
|
backend-webrtc: 'https://git.makerforce.io/beep/backend-webrtc.git'
|
||||||
- name: copy-docker-compose
|
- name: copy-docker-compose
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
settings:
|
settings:
|
||||||
|
|
|
@ -2,11 +2,11 @@ const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const cwd = process.cwd();
|
const cwd = process.cwd();
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
|
const ini = require('ini');
|
||||||
|
|
||||||
|
const gitmodules = ini.parse(fs.readFileSync('.gitmodules', 'utf-8'));
|
||||||
|
const submodules = Object.values(gitmodules).map(m => m.path);
|
||||||
const folders = fs.readdirSync(cwd, { withFileTypes: true });
|
const folders = fs.readdirSync(cwd, { withFileTypes: true });
|
||||||
const submodules = folders.filter(f =>
|
|
||||||
f.isDirectory() && fs.readdirSync(path.join(cwd, f.name)).includes('.git')
|
|
||||||
).map(f => f.name);
|
|
||||||
const dockers = folders.filter(f =>
|
const dockers = folders.filter(f =>
|
||||||
f.isDirectory() && fs.readdirSync(path.join(cwd, f.name)).includes('Dockerfile')
|
f.isDirectory() && fs.readdirSync(path.join(cwd, f.name)).includes('Dockerfile')
|
||||||
).map(f => f.name);
|
).map(f => f.name);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
"generate": "node drone_gen.js"
|
"generate": "node drone_gen.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"ini": "^1.3.5",
|
||||||
"js-yaml": "^3.13.0"
|
"js-yaml": "^3.13.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,11 @@ esprima@^4.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
||||||
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
|
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
|
||||||
|
|
||||||
|
ini@^1.3.5:
|
||||||
|
version "1.3.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
|
||||||
|
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
|
||||||
|
|
||||||
js-yaml@^3.13.0:
|
js-yaml@^3.13.0:
|
||||||
version "3.13.0"
|
version "3.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.0.tgz#38ee7178ac0eea2c97ff6d96fff4b18c7d8cf98e"
|
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.0.tgz#38ee7178ac0eea2c97ff6d96fff4b18c7d8cf98e"
|
||||||
|
|
Loading…
Reference in New Issue