Files
zeekay 34e2e06bdf The C# client, generated from hanzo-inc/cloud@a779b8b229 (8.5.988)
Every /v1 operation the gateway serves as a typed method, generated by
hanzoai/openapi's driver from its `csharp` row (openapi-generator 7.14.0,
httpclient library). Published as `Hanzo` on nuget.org, namespace
Hanzo.AI. The repo owns the csproj, Gateway.cs (endpoint, bearer and
X-Org-Id from the environment), seven wire tests against a stub transport,
and the six flows every Hanzo SDK carries. hanzo.yml gates all three and
puts the repo on the client lane; release.yml pushes a version nuget.org
does not yet serve. scripts/dotnet installs a .NET 10 SDK where a runner
has none.
2026-11-06 12:59:19 -08:00

37 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# The .NET SDK this repo builds with, wherever it runs: `./scripts/dotnet <args>`.
#
# A machine with a .NET 10 SDK on PATH uses it. One without — every CI runner in
# this fleet; the runner image bakes in Node, Go and a JDK and no .NET — gets the
# current LTS SDK installed into ~/.dotnet by Microsoft's dotnet-install.sh, with
# no root, once, and then reuses it. The package targets net8.0; the tests and
# examples roll forward onto whichever runtime this SDK brings.
set -euo pipefail
channel=10.0
major=${channel%%.*}
export DOTNET_CLI_TELEMETRY_OPTOUT=1 DOTNET_NOLOGO=1
has() { "$1" --list-sdks 2>/dev/null | grep -q "^${major}\."; }
if command -v dotnet >/dev/null 2>&1 && has dotnet; then
exec dotnet "$@"
fi
root="$HOME/.dotnet"
if ! has "$root/dotnet"; then
script="$(mktemp)"
curl -fsSL https://dot.net/v1/dotnet-install.sh -o "$script"
bash "$script" --channel "$channel" --install-dir "$root" --no-path >&2
rm -f "$script"
fi
export DOTNET_ROOT="$root" PATH="$root:$PATH"
# .NET will not start without ICU unless told the culture is invariant, and a
# bare Linux runner has none.
if [ "$(uname -s)" = Linux ] && ! ldconfig -p 2>/dev/null | grep -q libicu; then
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
fi
exec "$root/dotnet" "$@"