build: bootstrap Go toolchain and generated APIs
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
actual=$(mktemp)
|
||||
trap 'rm -f "$actual"' EXIT HUP INT TERM
|
||||
|
||||
cd "$repo_root"
|
||||
buf lint --error-format=text >"$actual" 2>&1 || true
|
||||
LC_ALL=C sort -o "$actual" "$actual"
|
||||
|
||||
if ! diff -u config/buf-lint-baseline.txt "$actual"; then
|
||||
echo "Buf lint findings changed; only the reviewed first-draft findings are accepted." >&2
|
||||
exit 1
|
||||
fi
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
echo "E2E requires the production server plus a native Windows host; that host is currently unavailable" >&2
|
||||
exit 2
|
||||
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
command=${1:-}
|
||||
case "$command" in
|
||||
doctor)
|
||||
docker version >/dev/null
|
||||
docker compose version >/dev/null
|
||||
echo "Docker and Docker Compose are available."
|
||||
;;
|
||||
status)
|
||||
echo "No test run has been created; the shared harness is not implemented yet."
|
||||
;;
|
||||
*)
|
||||
echo "usage: scripts/test-env doctor|status" >&2
|
||||
echo "recover/reuse/collect/reset/purge arrive with the Phase 0 harness implementation" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
echo "integration harness is not implemented yet; use scripts/test-unit for the current Phase 0/1 scope" >&2
|
||||
exit 2
|
||||
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
|
||||
package=./...
|
||||
run=
|
||||
race=false
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--package) package=$2; shift 2 ;;
|
||||
--run) run=$2; shift 2 ;;
|
||||
--race) race=true; shift ;;
|
||||
*) echo "usage: scripts/test-unit [--package PATTERN] [--run REGEXP] [--race]" >&2; exit 2 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
set -- go test -shuffle=on
|
||||
if [ "$race" = true ]; then set -- "$@" -race; fi
|
||||
if [ -n "$run" ]; then set -- "$@" -run "$run"; fi
|
||||
set -- "$@" "$package"
|
||||
|
||||
cd "$repo_root"
|
||||
exec docker compose -f deploy/compose.yaml run --rm toolchain "$@"
|
||||
|
||||
Reference in New Issue
Block a user