fix(release): change to get the release to build then release stuff

This commit is contained in:
2025-07-12 16:20:40 -05:00
parent 6c7f17893b
commit afab215a9e
3 changed files with 63 additions and 116 deletions

View File

@@ -85,92 +85,39 @@ function Update-BuildNumber {
}
}
while ($true) {
Write-Host "Select build option:"
Write-Host "1) Backend"
Write-Host "2) Frontend"
Write-Host "3) All"
Write-Host "4) Exit"
$choice = Read-Host "Enter your choice (1-4)"
switch ($choice) {
'1' {
Push-Location $rootDir/backend
Write-Host "Building the app"
go build -ldflags "-X main.version=$($version)-$($initialBuildValue)" -o lst_backend.exe ./main.go
if ($LASTEXITCODE -ne 0) {
Write-Warning "Backend build failed!"
Pop-Location
break
}
Write-Host "Backend build finished successfully."
Pop-Location
npm run release:createZip
npm run release
Update-BuildNumber
break
}
'2' {
Push-Location $rootDir/frontend
Write-Host "Building the frontend"
npm run build
if ($LASTEXITCODE -ne 0) {
Write-Warning "Fronend build failed!"
Pop-Location
break
}
Write-Host "Fronend build finished successfully."
Pop-Location
npm run release:createZip
npm run release
Update-BuildNumber
break
}
'3' {
Push-Location $rootDir/backend
Write-Host "Building the app"
go build -ldflags "-X main.version=$($version)-$($initialBuildValue)" -o lst_backend.exe ./main.go
if ($LASTEXITCODE -ne 0) {
Write-Warning "Backend build failed!"
Pop-Location
break
}
Write-Host "Backend build finished successfully."
Pop-Location
Push-Location $rootDir/frontend
Write-Host "Building the frontend"
npm run build
if ($LASTEXITCODE -ne 0) {
Write-Warning "Fronend build failed!"
Pop-Location
break
}
Write-Host "Fronend build finished successfully."
Pop-Location
npm run release:createZip
npm run release
Update-BuildNumber
break
}
'4' {
Write-Host "Exiting script."
exit 0
}
default {
Write-Warning "Invalid choice, please enter 1, 2, 3, or 4."
}
Push-Location $rootDir/backend
Write-Host "Building the app"
go build -ldflags "-X main.version=$($version)-$($initialBuildValue)" -o lst_backend.exe ./main.go
if ($LASTEXITCODE -ne 0) {
Write-Warning "Backend build failed!"
Pop-Location
break
}
}
Write-Host "Backend build finished successfully."
Pop-Location
Push-Location $rootDir/frontend
Write-Host "Building the frontend"
npm run build
if ($LASTEXITCODE -ne 0) {
Write-Warning "Fronend build failed!"
Pop-Location
break
}
Write-Host "Fronend build finished successfully."
Pop-Location
Update-BuildNumber
Write-Host "Zipping up the release"
npm run release:createZip
break