mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-28 23:24:16 +00:00
fc88c7678b
Change-type: patch
10 lines
282 B
JavaScript
10 lines
282 B
JavaScript
const { promises: fs } = require('fs');
|
|
|
|
async function parseVersion() {
|
|
const fields = ['head_branch', 'base_org', 'base_repo', 'componentVersion'];
|
|
const ver = JSON.parse(await fs.readFile('.git/.version'));
|
|
console.log(fields.map((f) => ver[f]).join(' '));
|
|
}
|
|
|
|
parseVersion();
|