oficina / suite Public

Clone
git clone https://amadan.net/oficina/suite

Plain git — no account needed to clone.

Download

Download this file

1#!/usr/bin/env bash
2set -euo pipefail
3
4export CGO_ENABLED=0
5if [ -z "${GOCACHE:-}" ]; then
6 suite_gate_cache="$(mktemp -d)"
7 export GOCACHE="$suite_gate_cache"
8 trap 'rm -rf -- "$suite_gate_cache"' EXIT
9fi
10
11unformatted="$(git ls-files -z -- '*.go' | xargs -0 -r gofmt -l)"
12if [ -n "$unformatted" ]; then
13 printf '%s\n' "$unformatted" >&2
14 exit 1
15fi
16
17go vet ./...
18go build ./...
19go test -count=1 ./...
20