Skip to content

Commit

Permalink
Fixed extensions for binaries built with the script
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Oct 20, 2022
1 parent fbc20c5 commit 556e032
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function BuildVariants {
foreach ($currentos in $os) {
$env:GOARCH = $currentarch
$env:GOOS = $currentos
go build -ldflags "$ldflags" -o binaries/$prefix-$currentos-$currentarch-$VERSION$suffix.exe $compileflags $path
go build -ldflags "$ldflags" -o binaries/$prefix-$currentos-$currentarch-$VERSION$suffix $compileflags $path
if (Get-Command "cyclonedx-gomod" -ErrorAction SilentlyContinue)
{
cyclonedx-gomod app -json -licenses -output binaries/$prefix-$currentos-$currentarch-$VERSION$suffix.bom.json -main $path .
Expand All @@ -35,5 +35,6 @@ 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 -path ./collector -arch @("386") -os @("windows")
BuildVariants -ldflags "$LDFLAGS -s" -prefix adalanche -path ./adalanche -arch @("amd64", "arm64") -os @("windows", "darwin", "linux")
BuildVariants -ldflags "$LDFLAGS -s" -prefix adalanche-collector -path ./collector -arch @("386") -os @("windows") -suffix ".exe"
BuildVariants -ldflags "$LDFLAGS -s" -prefix adalanche -path ./adalanche -arch @("amd64", "arm64") -os @("windows") -suffix ".exe"
BuildVariants -ldflags "$LDFLAGS -s" -prefix adalanche -path ./adalanche -arch @("amd64", "arm64") -os @("darwin", "linux")

0 comments on commit 556e032

Please sign in to comment.