From 9e4a2c4e295fc7608a2a62b4ef56d57d9728922b Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Tue, 20 Aug 2024 14:23:48 +0800 Subject: [PATCH] fix: tag check output --- examples/healthcheck/asciifile | 2 +- examples/healthcheck/reposize | 2 +- pkg/healthcheck/tag.go | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/healthcheck/asciifile b/examples/healthcheck/asciifile index 54fe3e3..a236c7e 160000 --- a/examples/healthcheck/asciifile +++ b/examples/healthcheck/asciifile @@ -1 +1 @@ -Subproject commit 54fe3e3a386a656664372fd95b527fe1f957dcc8 +Subproject commit a236c7ea934de5e59525fa27e4211f4a48dbbf93 diff --git a/examples/healthcheck/reposize b/examples/healthcheck/reposize index 2073d68..a49a6aa 160000 --- a/examples/healthcheck/reposize +++ b/examples/healthcheck/reposize @@ -1 +1 @@ -Subproject commit 2073d687142470aed2dcabb5bb0e016301a4140d +Subproject commit a49a6aa29d3dcb0509e8de540db0781aca596f26 diff --git a/pkg/healthcheck/tag.go b/pkg/healthcheck/tag.go index 46e2b89..d0f7f76 100644 --- a/pkg/healthcheck/tag.go +++ b/pkg/healthcheck/tag.go @@ -2,6 +2,7 @@ package healthcheck import ( "fmt" + "strings" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" @@ -55,7 +56,7 @@ func CheckTags(repoPath string, category string, n int) error { } } if !found { - return fmt.Errorf("Expected tag '%s' not found.", target) + return fmt.Errorf("Wrong release tag '%s' or missing release tags. Please use one of '%s'.", target, strings.Join(tags, "', '")) } return nil }