mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 14:29:07 +00:00
Added a cross-platform build script
This commit is contained in:
parent
1c5451fccf
commit
64cbf1fcb3
29
app/MindWork AI Studio/build.nu
Executable file
29
app/MindWork AI Studio/build.nu
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
build
|
||||
|
||||
def build [] {
|
||||
# Define the list of RIDs to build for, cf. https://learn.microsoft.com/en-us/dotnet/core/rid-catalog:
|
||||
let rids = ["win-x64", "win-arm64", "linux-x64", "linux-arm64", "osx-arm64", "osx-x64"]
|
||||
|
||||
# Get the current OS:
|
||||
let current_os = (sys).host.name | str downcase
|
||||
let current_os = match $current_os {
|
||||
"windows" => "win-",
|
||||
"linux" => "linux-",
|
||||
"darwin" => "osx-",
|
||||
_ => {
|
||||
print $"Unsupported OS: ($current_os)"
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
# Filter the RIDs to build for the current OS:
|
||||
let rids = $rids | where $it =~ $current_os
|
||||
|
||||
# Build for each RID:
|
||||
for rid in $rids {
|
||||
print $"Start building for ($rid)..."
|
||||
^dotnet publish -c release -r $rid
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user