Skip to content

Commit

Permalink
Fixed naming problem for matrix builds in PowerShell build script
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Sep 12, 2022
1 parent 7f5c89e commit 5ab49f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ function BuildVariants {
foreach ($currentos in $os) {
$env:GOARCH = $currentarch
$env:GOOS = $currentos
go build -ldflags "$ldflags" -o binaries/$prefix-$currentarch-$currentos-$VERSION$suffix.exe $compileflags $path
go build -ldflags "$ldflags" -o binaries/$prefix-$currentos-$currentarch-$VERSION$suffix.exe $compileflags $path
if (Get-Command "cyclonedx-gomod" -ErrorAction SilentlyContinue)
{
cyclonedx-gomod app -json -licenses -output binaries/$prefix-$currentarch-$currentos-$VERSION$suffix.bom.json -main $path .
cyclonedx-gomod app -json -licenses -output binaries/$prefix-$currentos-$currentarch-$VERSION$suffix.bom.json -main $path .
}
}
}
Expand All @@ -35,5 +35,5 @@ if ("$DIRTYFILES" -ne "") {
$LDFLAGS = "-X github.com/lkarlslund/adalanche/modules/version.Commit=$COMMIT -X github.com/lkarlslund/adalanche/modules/version.Version=$VERSION"

# Release
BuildVariants -ldflags "$LDFLAGS -s" -prefix adalanche-collector-windows -path ./collector -arch @("386") -os @("windows")
BuildVariants -ldflags "$LDFLAGS -s" -prefix adalanche-windows -path ./adalanche -arch @("amd64", "arm64") -os @("windows", "darwin", "linux")
BuildVariants -ldflags "$LDFLAGS -s" -prefix adalanche-collector -path ./collector -arch @("386") -os @("windows")
BuildVariants -ldflags "$LDFLAGS -s" -prefix adalanche -path ./adalanche -arch @("amd64", "arm64") -os @("windows", "darwin", "linux")

0 comments on commit 5ab49f7

Please sign in to comment.