From 0161570085c1c8d36a839d7e9591ca76dd214b6f Mon Sep 17 00:00:00 2001 From: Lars Karlslund Date: Fri, 12 Jan 2024 09:04:34 +0100 Subject: [PATCH] Fix for build script --- build.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build.ps1 b/build.ps1 index 5fcaa64..b461869 100644 --- a/build.ps1 +++ b/build.ps1 @@ -15,14 +15,15 @@ function BuildVariants { $env:GOOS = $currentos # More sensible naming for x64 - if ($currentarch -eq "amd64") { - $currentarch = "x64" + $namearch = $currentarch + if ($namearch -eq "amd64") { + $namearch = "x64" } - go build -ldflags "$ldflags" -o binaries/$prefix-$currentos-$currentarch-$VERSION$suffix $compileflags $path + go build -ldflags "$ldflags" -o binaries/$prefix-$currentos-$namearch-$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 . + cyclonedx-gomod app -json -licenses -output binaries/$prefix-$currentos-$namearch-$VERSION$suffix.bom.json -main $path . } } }