build(build): linked everything together

This commit is contained in:
2025-07-12 16:01:51 -05:00
parent 8cb416ecc8
commit fdf5e257c6
3 changed files with 51 additions and 46 deletions

View File

@@ -109,6 +109,7 @@ while ($true) {
Pop-Location
npm run release:createZip
npm run release
Update-BuildNumber
break
}
@@ -125,6 +126,7 @@ while ($true) {
Write-Host "Fronend build finished successfully."
Pop-Location
npm run release:createZip
npm run release
Update-BuildNumber
break
}
@@ -145,6 +147,7 @@ while ($true) {
Push-Location $rootDir/frontend
Write-Host "Building the frontend"
npm run build
if ($LASTEXITCODE -ne 0) {
Write-Warning "Fronend build failed!"
Pop-Location
@@ -154,6 +157,7 @@ while ($true) {
Write-Host "Fronend build finished successfully."
Pop-Location
npm run release:createZip
npm run release
Update-BuildNumber
break

View File

@@ -33,12 +33,13 @@ try {
rawBuild = (await fs.readFile(buildNumberPath, "utf8")).trim();
console.log("Raw build", rawBuild);
if (rawBuild) {
const [numPart, namePart] = rawBuild.split("-");
const num = parseInt(numPart, 10);
// const [numPart, namePart] = rawBuild.split("-");
// const num = parseInt(numPart, 10);
if (!isNaN(num) && namePart) {
buildNumber = `${num - 1}-${namePart}`;
}
// if (!isNaN(num) && namePart) {
// buildNumber = `${num - 1}-${namePart}`;
// }
buildNumber = rawBuild;
}
} catch {
console.warn("BUILD_NUMBER file not found, defaulting to 0");