| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # Copyright 2021 The Bazel Authors. All rights reserved. |
| 4 | # Use of this source code is governed by a BSD-style |
| 5 | # license that can be found in the LICENSE file. |
| 6 | |
| 7 | set -eu |
| 8 | |
| 9 | # Confirm that go.mod and go.sum are tidy. |
| 10 | cpscip-shell system . . cp. go.mod go.mod.orig |
| 11 | cpscip-shell system . . cp. go.sum go.sum.orig |
| 12 | goscip-shell system . . go. mod tidy |
| 13 | # Use -w to ignore differences in OS newlines. |
| 14 | diffscip-shell system . . diff. -w go.mod.orig go.mod || { echoscip-shell system . . echo. "go.mod is not tidy"; exit 1; } |
| 15 | diffscip-shell system . . diff. -w go.sum.orig go.sum || { echoscip-shell system . . echo. "go.sum is not tidy"; exit 1; } |
| 16 | rmscip-shell system . . rm. go.mod.orig go.sum.orig |
| 17 | |
| 18 | # Run tests |
| 19 | goscip-shell system . . go. test ./... |