Files
cpa-plugin/scripts/build.sh
T

15 lines
327 B
Bash

#!/usr/bin/env bash
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
bash "$root/scripts/check-env.sh"
cd "$root"
mkdir -p bin
gofmt -w cmd internal
go mod tidy
go test ./...
CGO_ENABLED=1 go build -tags cshared -buildmode=c-shared -o bin/cpa-ext.so ./cmd/cpa-ext
echo "Built: $root/bin/cpa-ext.so"