Skip to content

v0.2.172

Choose a tag to compare

@github-actions github-actions released this 21 May 18:36
· 134 commits to main since this release
v0.2.172
3731c8c

These instructions are meant as an easy way to install. Unix snippets use sha256sum; macOS users may need coreutils for that command.

x86_64-apple-darwin

# Export the sha256sum for verification.
$ export ZOO_CLI_SHA256="345a79ca32d96650b1ad9524faac4464127e58f6ef7efb09028a3341194dba2d"


# Download and check the sha256sum.
$ curl -fSL "https://dl.zoo.dev/releases/cli/v0.2.172/zoo-x86_64-apple-darwin" -o "/usr/local/bin/zoo" \
	&& echo "${ZOO_CLI_SHA256}  /usr/local/bin/zoo" | sha256sum -c - \
	&& chmod a+x "/usr/local/bin/zoo"


$ echo "zoo cli installed!"

# Run it!
$ zoo -h

aarch64-apple-darwin

# Export the sha256sum for verification.
$ export ZOO_CLI_SHA256="4a4bb48af1869c8663251f91f4fc3adf1b3593cf8d765c8ef63bc374bc3a3e3f"


# Download and check the sha256sum.
$ curl -fSL "https://dl.zoo.dev/releases/cli/v0.2.172/zoo-aarch64-apple-darwin" -o "/usr/local/bin/zoo" \
	&& echo "${ZOO_CLI_SHA256}  /usr/local/bin/zoo" | sha256sum -c - \
	&& chmod a+x "/usr/local/bin/zoo"


$ echo "zoo cli installed!"

# Run it!
$ zoo -h

x86_64-pc-windows-gnu

# Export the sha256sum for verification.
$ZOO_CLI_SHA256 = "53c813cc39e447648ae7b6a858765e3c5c93dfbc5b86045bb19c21417a5d70d2"

# Define where to install the Zoo CLI.
$zooPath = Join-Path $env:LOCALAPPDATA "Zoo"
$cliPath = Join-Path $zooPath "zoo.exe"

# Create the directory for the Zoo CLI.
New-Item -ItemType Directory -Force -Path $zooPath | Out-Null

# Download and check the sha256sum.
Invoke-WebRequest -Uri "https://dl.zoo.dev/releases/cli/v0.2.172/zoo-x86_64-pc-windows-gnu" -OutFile $cliPath
$actualHash = (Get-FileHash -Algorithm SHA256 $cliPath).Hash.ToLowerInvariant()
if ($actualHash -ne $ZOO_CLI_SHA256.ToLowerInvariant()) {
    throw "Checksum verification failed for $cliPath"
}

function Test-PathContains {
    param(
        [string]$PathValue,
        [string]$Directory
    )

    if ([string]::IsNullOrWhiteSpace($PathValue)) {
        return $false
    }

    $directoryToFind = $Directory.TrimEnd('\')
    foreach ($entry in $PathValue -split ';') {
        if ($entry.TrimEnd('\') -ieq $directoryToFind) {
            return $true
        }
    }

    return $false
}

# Add the Zoo CLI directory to your user Path if needed.
$userPath = [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)
if (-not (Test-PathContains -PathValue $userPath -Directory $zooPath)) {
    $pathEntries = @()
    if (-not [string]::IsNullOrWhiteSpace($userPath)) {
        $pathEntries = $userPath -split ';' | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
    }
    $pathEntries += $zooPath
    [Environment]::SetEnvironmentVariable("Path", ($pathEntries -join ';'), [EnvironmentVariableTarget]::User)
}

# Make the new Path available in this PowerShell session.
if (-not (Test-PathContains -PathValue $env:Path -Directory $zooPath)) {
    $env:Path = ((@($env:Path, $zooPath) | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }) -join ';')
}

Write-Host "zoo cli installed!"

# Run it!
zoo -h

x86_64-unknown-linux-musl

# Export the sha256sum for verification.
$ export ZOO_CLI_SHA256="787832bf3d1e9dc3af01036b555235f2a2355b1bdacd692a4e3c729944a01182"


# Download and check the sha256sum.
$ curl -fSL "https://dl.zoo.dev/releases/cli/v0.2.172/zoo-x86_64-unknown-linux-musl" -o "/usr/local/bin/zoo" \
	&& echo "${ZOO_CLI_SHA256}  /usr/local/bin/zoo" | sha256sum -c - \
	&& chmod a+x "/usr/local/bin/zoo"


$ echo "zoo cli installed!"

# Run it!
$ zoo -h

aarch64-unknown-linux-musl

# Export the sha256sum for verification.
$ export ZOO_CLI_SHA256="26f83400f77bfa17454f5aafe26b130ecdf80c87a692b619810b51e843252fb2"


# Download and check the sha256sum.
$ curl -fSL "https://dl.zoo.dev/releases/cli/v0.2.172/zoo-aarch64-unknown-linux-musl" -o "/usr/local/bin/zoo" \
	&& echo "${ZOO_CLI_SHA256}  /usr/local/bin/zoo" | sha256sum -c - \
	&& chmod a+x "/usr/local/bin/zoo"


$ echo "zoo cli installed!"

# Run it!
$ zoo -h