fix: make build process work
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m6s

This commit is contained in:
2024-06-24 07:25:59 -04:00
parent c08fa6c2d8
commit 998c88d783
4 changed files with 10 additions and 16 deletions

View File

@@ -1,19 +1,10 @@
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
try {
// Run semantic-release to get the next version number
const dryRunOutput = execSync('npx semantic-release --dry-run').toString();
const version = process.argv[2];
// Extract the version number from the semantic-release output
const versionMatch = dryRunOutput.match(
/The next release version is ([\S]+)/
);
if (!versionMatch) {
throw new Error('Version number not found in semantic-release output');
}
const version = versionMatch[1];
if (!version) throw Error('Must pass version on command line');
// Create version content
const versionContent = `export const APP_VERSION = '${version}';\n`;