|
@@ -38,7 +38,7 @@ function checkEnv() {
|
|
|
|
|
|
# Check for signing key
|
|
# Check for signing key
|
|
if ("${env:KEY_CONTAINER}") {
|
|
if ("${env:KEY_CONTAINER}") {
|
|
- ${env:OLLAMA_CERT}=$(resolve-path "${script:SRC_DIR}\ollama_inc.crt")
|
|
|
|
|
|
+ ${script:OLLAMA_CERT}=$(resolve-path "${script:SRC_DIR}\ollama_inc.crt")
|
|
Write-host "Code signing enabled"
|
|
Write-host "Code signing enabled"
|
|
# Note: 10 Windows Kit signtool crashes with GCP's plugin
|
|
# Note: 10 Windows Kit signtool crashes with GCP's plugin
|
|
${script:SignTool}="C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool.exe"
|
|
${script:SignTool}="C:\Program Files (x86)\Windows Kits\8.1\bin\x64\signtool.exe"
|
|
@@ -56,7 +56,7 @@ function buildOllama() {
|
|
& go build "-ldflags=-w -s ""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" .
|
|
& go build "-ldflags=-w -s ""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" .
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
if ("${env:KEY_CONTAINER}") {
|
|
if ("${env:KEY_CONTAINER}") {
|
|
- & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${env:OLLAMA_CERT}" `
|
|
|
|
|
|
+ & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" `
|
|
/csp "Google Cloud KMS Provider" /kc ${env:KEY_CONTAINER} ollama.exe
|
|
/csp "Google Cloud KMS Provider" /kc ${env:KEY_CONTAINER} ollama.exe
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
}
|
|
}
|
|
@@ -70,7 +70,7 @@ function buildApp() {
|
|
& go build "-ldflags=-H windowsgui -w -s ""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" .
|
|
& go build "-ldflags=-H windowsgui -w -s ""-X=github.com/jmorganca/ollama/version.Version=$script:VERSION"" ""-X=github.com/jmorganca/ollama/server.mode=release""" .
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
if ("${env:KEY_CONTAINER}") {
|
|
if ("${env:KEY_CONTAINER}") {
|
|
- & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${env:OLLAMA_CERT}" `
|
|
|
|
|
|
+ & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" `
|
|
/csp "Google Cloud KMS Provider" /kc ${env:KEY_CONTAINER} app.exe
|
|
/csp "Google Cloud KMS Provider" /kc ${env:KEY_CONTAINER} app.exe
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
}
|
|
}
|
|
@@ -97,7 +97,7 @@ function gatherDependencies() {
|
|
write-host "about to sign"
|
|
write-host "about to sign"
|
|
foreach ($file in (get-childitem "${script:DEPS_DIR}/cu*.dll") + @("${script:SRC_DIR}\dist\ollama_welcome.ps1")){
|
|
foreach ($file in (get-childitem "${script:DEPS_DIR}/cu*.dll") + @("${script:SRC_DIR}\dist\ollama_welcome.ps1")){
|
|
write-host "signing $file"
|
|
write-host "signing $file"
|
|
- & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${env:OLLAMA_CERT}" `
|
|
|
|
|
|
+ & "${script:SignTool}" sign /v /fd sha256 /t http://timestamp.digicert.com /f "${script:OLLAMA_CERT}" `
|
|
/csp "Google Cloud KMS Provider" /kc ${env:KEY_CONTAINER} $file
|
|
/csp "Google Cloud KMS Provider" /kc ${env:KEY_CONTAINER} $file
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
|
|
}
|
|
}
|
|
@@ -110,7 +110,7 @@ function buildInstaller() {
|
|
cd "${script:SRC_DIR}\app"
|
|
cd "${script:SRC_DIR}\app"
|
|
$env:PKG_VERSION=$script:PKG_VERSION
|
|
$env:PKG_VERSION=$script:PKG_VERSION
|
|
if ("${env:KEY_CONTAINER}") {
|
|
if ("${env:KEY_CONTAINER}") {
|
|
- & "${script:INNO_SETUP_DIR}\ISCC.exe" /SMySignTool="${script:SignTool} sign /fd sha256 /t http://timestamp.digicert.com /f ${env:OLLAMA_CERT} /csp `$qGoogle Cloud KMS Provider`$q /kc ${env:KEY_CONTAINER} `$f" .\ollama.iss
|
|
|
|
|
|
+ & "${script:INNO_SETUP_DIR}\ISCC.exe" /SMySignTool="${script:SignTool} sign /fd sha256 /t http://timestamp.digicert.com /f ${script:OLLAMA_CERT} /csp `$qGoogle Cloud KMS Provider`$q /kc ${env:KEY_CONTAINER} `$f" .\ollama.iss
|
|
} else {
|
|
} else {
|
|
& "${script:INNO_SETUP_DIR}\ISCC.exe" .\ollama.iss
|
|
& "${script:INNO_SETUP_DIR}\ISCC.exe" .\ollama.iss
|
|
}
|
|
}
|