fix(relrease): maybe finally got it

This commit is contained in:
2025-07-12 15:56:15 -05:00
parent 8622408e0b
commit c0aa64db63
2 changed files with 14 additions and 5 deletions

View File

@@ -18,10 +18,17 @@ if (!version) {
process.exit(1);
}
// Resolve the directory of the current script
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Absolute path to BUILD_NUMBER
const buildNumberPath = path.resolve(__dirname, '../BUILD_NUMBER');
// Load build number from BUILD_NUMBER file
let buildNumber = '0';
try {
rawBuild = (await fs.readFile('BUILD_NUMBER', 'utf8')).trim();
rawBuild = (await fs.readFile(buildNumberPath, 'utf8')).trim();
console.log("Raw build" ,rawBuild)
if (rawBuild) {
const [numPart, namePart] = rawBuild.split('-');