refactor(build): changes to remove the build name as it was not really realvent

we will soon include it in the main file if anyone else starts to build with us
This commit is contained in:
2025-07-21 17:13:24 -05:00
parent 2d2337257f
commit 392a9ef407

View File

@@ -26,10 +26,10 @@ if (Test-Path $envFile) {
Write-Host ".env file not found at $envFile" Write-Host ".env file not found at $envFile"
} }
if (-not $env:BUILD_NAME) { # if (-not $env:BUILD_NAME) {
Write-Warning "BUILD_NAME environment variable is not set. Please make sure you have entered the correct info the env" # Write-Warning "BUILD_NAME environment variable is not set. Please make sure you have entered the correct info the env"
exit 1 # exit 1
} # }
function Get-PackageVersion { function Get-PackageVersion {
param ( param (
@@ -78,7 +78,7 @@ function Update-BuildNumber {
$name = $matches[2] $name = $matches[2]
$newNumber = $number + 1 $newNumber = $number + 1
$newBuildNumber = "$newNumber-$name" $newBuildNumber = "$newNumber"
Set-Content -Path $buildNumberFile -Value $newBuildNumber Set-Content -Path $buildNumberFile -Value $newBuildNumber
@@ -95,14 +95,14 @@ function Update-BuildNumber {
Push-Location $rootDir/backend Push-Location $rootDir/backend
Write-Host "Building the app" Write-Host "Building the app"
go get go get
go build -ldflags "-X main.version=$($version)-$($initialBuildValue)" -o lst_backend.exe ./main.go go build -ldflags "-X main.version=$($version)-$($initialBuildValue)" -o lst_app.exe ./main.go
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
Write-Warning "Backend build failed!" Write-Warning "app build failed!"
Pop-Location Pop-Location
break break
} }
Write-Host "Backend build finished successfully." Write-Host "app build finished successfully."
Pop-Location Pop-Location
@@ -123,10 +123,10 @@ function Update-BuildNumber {
Write-Host "Building wrapper" Write-Host "Building wrapper"
Push-Location $rootDir/LstWrapper Push-Location $rootDir/LstWrapper
#remove the publish folder as we done need it #remove the publish folder as we done need it
if (-not (Test-Path "/publish")) { if (-not (Test-Path "publish")) {
Write-Host "The publish folder is already deleted nothing else to do" Write-Host "The publish folder is already deleted nothing else to do"
} else { } else {
Remove-Item -LiteralPath "/publish" -Force -Recurse Remove-Item -LiteralPath "publish" -Force -Recurse
} }
dotnet publish -c Release -o ./publish dotnet publish -c Release -o ./publish