UNPKG

matterbridge-daikin-ac

Version:
15 lines (12 loc) 547 B
/* eslint-disable @typescript-eslint/no-require-imports */ const { execSync } = require('node:child_process'); const fs = require('node:fs'); const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim(); const commit = execSync('git rev-parse HEAD').toString().trim(); const content = `// Auto-generated by genGitInfo.cjs export const GIT_BRANCH = '${branch}'; export const GIT_COMMIT = '${commit}'; `; fs.writeFileSync('src/gitInfo.ts', content); // eslint-disable-next-line no-console console.log('src/gitInfo.ts generated.');