Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
204349b1
Commit
204349b1
authored
Apr 26, 2024
by
Hernan Martinez
Browse files
Use architecture specific folders in the build script
parent
86e67fc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
scripts/build_windows.ps1
scripts/build_windows.ps1
+7
-5
No files found.
scripts/build_windows.ps1
View file @
204349b1
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
$Error
ActionPreference
=
"Stop"
$Error
ActionPreference
=
"Stop"
function
checkEnv
()
{
function
checkEnv
()
{
$
script
:
TARGET_ARCH
=
$
Env
:
PROCESSOR_ARCHITECTURE
.
ToLower
()
Write-host
"Building for
${script:TARGET_ARCH}
"
write-host
"Locating required tools and paths"
write-host
"Locating required tools and paths"
$
script
:
SRC_DIR
=
$PWD
$
script
:
SRC_DIR
=
$PWD
if
(
!
$
env
:
VCToolsRedistDir
)
{
if
(
!
$
env
:
VCToolsRedistDir
)
{
...
@@ -30,7 +32,7 @@ function checkEnv() {
...
@@ -30,7 +32,7 @@ function checkEnv() {
$
script
:
INNO_SETUP_DIR
=
(
get-item
"C:\Program Files*\Inno Setup*\"
)[
0
]
$
script
:
INNO_SETUP_DIR
=
(
get-item
"C:\Program Files*\Inno Setup*\"
)[
0
]
$
script
:
DEPS_DIR
=
"
${script:SRC_DIR}
\dist\windows-
amd64
"
$
script
:
DEPS_DIR
=
"
${script:SRC_DIR}
\dist\windows-
${script:TARGET_ARCH}
"
$
env
:
CGO_ENABLED
=
"1"
$
env
:
CGO_ENABLED
=
"1"
echo
"Checking version"
echo
"Checking version"
if
(
!
$
env
:
VERSION
)
{
if
(
!
$
env
:
VERSION
)
{
...
@@ -81,8 +83,8 @@ function buildOllama() {
...
@@ -81,8 +83,8 @@ function buildOllama() {
/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
)}
}
}
New-Item
-ItemType
Directory
-Path
.
\dist\windows-
amd64
\
-Force
New-Item
-ItemType
Directory
-Path
.
\dist\windows-
${script:TARGET_ARCH}
\
-Force
cp
.
\ollama.exe
.
\dist\windows-
amd64
\
cp
.
\ollama.exe
.
\dist\windows-
${script:TARGET_ARCH}
\
}
}
function
buildApp
()
{
function
buildApp
()
{
...
@@ -135,8 +137,8 @@ function buildInstaller() {
...
@@ -135,8 +137,8 @@ function buildInstaller() {
}
}
function
distZip
()
{
function
distZip
()
{
write-host
"Generating stand-alone distribution zip file
${script:SRC_DIR}
\dist\ollama-windows-
amd64
.zip"
write-host
"Generating stand-alone distribution zip file
${script:SRC_DIR}
\dist\ollama-windows-
${script:TARGET_ARCH}
.zip"
Compress-Archive
-Path
"
${script:SRC_DIR}
\dist\windows-
amd64
\*"
-DestinationPath
"
${script:SRC_DIR}
\dist\ollama-windows-
amd64
.zip"
-Force
Compress-Archive
-Path
"
${script:SRC_DIR}
\dist\windows-
${script:TARGET_ARCH}
\*"
-DestinationPath
"
${script:SRC_DIR}
\dist\ollama-windows-
${script:TARGET_ARCH}
.zip"
-Force
}
}
try
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment