mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-04 05:43:37 +09:00
tools/bump: reword the verify failure
"invariant" is not language this repository uses.
This commit is contained in:
@@ -45,7 +45,7 @@ func oapiVersion(r *repo) (string, error) {
|
|||||||
return m[1], nil
|
return m[1], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// generateClients mirrors the Makefile's client recipe. The bot does not shell
|
// generateClients repeats the Makefile's client recipe. The bot does not shell
|
||||||
// out to make, but check-generated.yml still runs the real target and diffs, so
|
// out to make, but check-generated.yml still runs the real target and diffs, so
|
||||||
// any drift between the two surfaces on the bot's own pull request.
|
// any drift between the two surfaces on the bot's own pull request.
|
||||||
func generateClients(ctx context.Context, r *repo) error {
|
func generateClients(ctx context.Context, r *repo) error {
|
||||||
|
|||||||
@@ -10,14 +10,14 @@ import (
|
|||||||
"golang.org/x/mod/semver"
|
"golang.org/x/mod/semver"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errInvariants = errors.New("version pins are inconsistent")
|
var errPinsDisagree = errors.New("version pins disagree")
|
||||||
|
|
||||||
// finding is one violated invariant, phrased so the fix is obvious.
|
// finding is one disagreement, phrased so the fix is obvious.
|
||||||
type finding string
|
type finding string
|
||||||
|
|
||||||
// cmdVerify asserts the pins agree with each other and with their upstreams. It
|
// cmdVerify checks that the pins agree with each other and with their
|
||||||
// is deliberately separate from run: the same checks catch a hand-written
|
// upstreams. It is deliberately separate from run: the same checks catch a
|
||||||
// commit that breaks a lockstep rule, not just a bad automated one.
|
// hand-written commit that breaks a lockstep rule, not just a bad automated one.
|
||||||
func cmdVerify(ctx context.Context) error {
|
func cmdVerify(ctx context.Context) error {
|
||||||
r, err := openRepo(ctx)
|
r, err := openRepo(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -41,7 +41,7 @@ func cmdVerify(ctx context.Context) error {
|
|||||||
log.Printf("- %s", f)
|
log.Printf("- %s", f)
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Errorf("%w: %d finding(s)", errInvariants, len(findings))
|
return fmt.Errorf("%w: %d finding(s)", errPinsDisagree, len(findings))
|
||||||
}
|
}
|
||||||
|
|
||||||
func verifyLockstep(ctx context.Context, r *repo) []finding {
|
func verifyLockstep(ctx context.Context, r *repo) []finding {
|
||||||
|
|||||||
Reference in New Issue
Block a user