mirror of
https://github.com/Noratrieb/actions-playground.git
synced 2026-01-14 09:05:00 +01:00
new commit
This commit is contained in:
parent
63fa93285e
commit
3c521f41cf
6 changed files with 30 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
.idea
|
||||||
3
bar-service/bar.sh
Normal file
3
bar-service/bar.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo 'running bar!'
|
||||||
3
bar-service/build.sh
Normal file
3
bar-service/build.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo 'building very hard!'
|
||||||
3
foo-service/build.sh
Normal file
3
foo-service/build.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo 'Building very hard!'
|
||||||
3
foo-service/foo.sh
Normal file
3
foo-service/foo.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo 'Running foo!'
|
||||||
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