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:
@@ -26,10 +26,10 @@ if (Test-Path $envFile) {
|
||||
Write-Host ".env file not found at $envFile"
|
||||
}
|
||||
|
||||
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"
|
||||
exit 1
|
||||
}
|
||||
# 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"
|
||||
# exit 1
|
||||
# }
|
||||
|
||||
function Get-PackageVersion {
|
||||
param (
|
||||
@@ -78,7 +78,7 @@ function Update-BuildNumber {
|
||||
$name = $matches[2]
|
||||
|
||||
$newNumber = $number + 1
|
||||
$newBuildNumber = "$newNumber-$name"
|
||||
$newBuildNumber = "$newNumber"
|
||||
|
||||
Set-Content -Path $buildNumberFile -Value $newBuildNumber
|
||||
|
||||
@@ -95,14 +95,14 @@ function Update-BuildNumber {
|
||||
Push-Location $rootDir/backend
|
||||
Write-Host "Building the app"
|
||||
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) {
|
||||
Write-Warning "Backend build failed!"
|
||||
Write-Warning "app build failed!"
|
||||
Pop-Location
|
||||
break
|
||||
}
|
||||
|
||||
Write-Host "Backend build finished successfully."
|
||||
Write-Host "app build finished successfully."
|
||||
|
||||
Pop-Location
|
||||
|
||||
@@ -123,10 +123,10 @@ function Update-BuildNumber {
|
||||
Write-Host "Building wrapper"
|
||||
Push-Location $rootDir/LstWrapper
|
||||
#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"
|
||||
} else {
|
||||
Remove-Item -LiteralPath "/publish" -Force -Recurse
|
||||
Remove-Item -LiteralPath "publish" -Force -Recurse
|
||||
}
|
||||
|
||||
dotnet publish -c Release -o ./publish
|
||||
|
||||
Reference in New Issue
Block a user