balena-cli/automation/caxa/parse-version.js
Paulo Castro fc88c7678b Inspect CI
Change-type: patch
2021-06-18 16:51:46 +01:00

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();