new commit

This commit is contained in:
nora 2022-08-12 14:34:44 +02:00
parent 63fa93285e
commit 3c521f41cf
6 changed files with 30 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.idea

3
bar-service/bar.sh Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo 'running bar!'

3
bar-service/build.sh Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo 'building very hard!'

3
foo-service/build.sh Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo 'Building very hard!'

3
foo-service/foo.sh Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo 'Running foo!'

17
gen-service-version.mjs Normal file
View file

@ -0,0 +1,17 @@
import * as child_process from 'child_process';
const services = ['bar-service', 'foo-service'];
function latestCommitInDirectory(dirname) {
return child_process.execSync(`git log --pretty=format:%H -n 1 -- ${dirname}`);
}
const serviceVersions = {};
for (const service of services) {
const version = latestCommitInDirectory(service);
serviceVersions[service] = version;
}
console.log(serviceVersions);