mirror of
https://github.com/openai/openai-go.git
synced 2026-03-31 16:47:11 +09:00
20 lines
548 B
Bash
Executable File
20 lines
548 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo "==> Checking go.mod is tidy"
|
|
go mod tidy
|
|
if ! git diff --exit-code -- go.mod go.sum; then
|
|
echo "go.mod or go.sum has uncommitted changes. Please run 'go mod tidy' and commit the changes."
|
|
exit 1
|
|
fi
|
|
|
|
echo "==> Checking examples/go.mod is tidy"
|
|
(cd examples && go mod tidy)
|
|
if ! git diff --exit-code -- examples/go.mod examples/go.sum; then
|
|
echo "examples/go.mod or examples/go.sum has uncommitted changes. Please run 'cd examples && go mod tidy' and commit the changes."
|
|
exit 1
|
|
fi
|