From 8782dd562819606c6b84f0e075e987f6744e83d2 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 22 Feb 2024 17:41:43 -0500 Subject: [PATCH] fix `build_windows.ps1` script to run `go build` with the correct flags --- scripts/build_windows.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build_windows.ps1 b/scripts/build_windows.ps1 index 7bfa0455..fc8804c2 100644 --- a/scripts/build_windows.ps1 +++ b/scripts/build_windows.ps1 @@ -53,7 +53,7 @@ function buildOllama() { write-host "Building ollama CLI" & go generate ./... if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} - & go build "-ldflags=""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" . + & go build -ldflags "-X=github.com/jmorganca/ollama/version.Version=$script:VERSION -X=github.com/jmorganca/ollama/server.mode=release" . if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} if ("${env:KEY_CONTAINER}") { & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" ` @@ -68,7 +68,7 @@ function buildApp() { write-host "Building Ollama App" cd "${script:SRC_DIR}\app" & windres -l 0 -o ollama.syso ollama.rc - & go build "-ldflags=-H windowsgui ""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" . + & go build -ldflags "-H windowsgui -X=github.com/jmorganca/ollama/version.Version=$script:VERSION -X=github.com/jmorganca/ollama/server.mode=release" . if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} if ("${env:KEY_CONTAINER}") { & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" ` @@ -130,4 +130,4 @@ try { } finally { set-location $script:SRC_DIR $env:PKG_VERSION="" -} \ No newline at end of file +}