fix: make build process work
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m6s
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m6s
This commit is contained in:
@@ -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`;
|
||||
|
||||
Reference in New Issue
Block a user