fix: milestone number
All checks were successful
build / build (push) Successful in 1m18s
build / build (pull_request) Successful in 1m16s
build / trigger-build-image (push) Has been skipped
build / trigger-build-image (pull_request) Has been skipped

This commit is contained in:
zzjc1234 2024-10-07 13:14:36 +08:00
parent bb63cb65ba
commit 4ee64e78ba
3 changed files with 7 additions and 3 deletions

View File

@ -47,6 +47,7 @@ func main() {
droneBranch := flag.String("droneBranch", "", "")
releaseCategories := flag.String("releaseCategories", "", "")
releaseNumber := flag.Int("releaseNumber", 0, "")
mileStoneNumber := flag.Int("mileStoneNumber", 0, "")
checkFileNameList := flag.String("checkFileNameList", "", "Comma-separated list of files to check.")
checkFileSumList := flag.String("checkFileSumList", "", "Comma-separated list of expected checksums.")
parseMultiValueFlag(&gitWhitelist, "whitelist", "")
@ -78,7 +79,7 @@ func main() {
if err != nil {
fmt.Printf("### Non-ASCII Characters Commit Message Check Failed:\n%s\n", err.Error())
}
err = healthcheck.CheckTags(*rootDir, *releaseCategories, *releaseNumber)
err = healthcheck.CheckTags(*rootDir, *releaseCategories, *releaseNumber, *mileStoneNumber)
if err != nil {
fmt.Printf("### Release Tag Check Failed:\n%s\n", err.Error())
}

@ -1 +1 @@
Subproject commit 30b179812335b427a431c303ed3453779f898796
Subproject commit 4bb5498b5c0712f2ddbeb837c2e0aed89bea736e

View File

@ -31,7 +31,7 @@ func getTagsFromRepo(repoPath string) ([]string, error) {
return tags, nil
}
func CheckTags(repoPath string, category string, n int) error {
func CheckTags(repoPath string, category string, n int, m int) error {
// INFO: if category not specified, skipping this check by default
if category == "" {
return nil
@ -52,6 +52,9 @@ func CheckTags(repoPath string, category string, n int) error {
prefix = "a"
}
target := prefix + fmt.Sprintf("%d", n)
if category == "project" {
target += fmt.Sprintf("m%d", m)
}
found := false
for _, tag := range tags {
if tag == target {