mirror of
https://github.com/Noratrieb/actions-playground.git
synced 2026-01-14 17:05:05 +01:00
new commit
This commit is contained in:
parent
63fa93285e
commit
3c521f41cf
6 changed files with 30 additions and 0 deletions
17
gen-service-version.mjs
Normal file
17
gen-service-version.mjs
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue