fix: milestone number (#48)
All checks were successful
build / build (push) Successful in 1m39s
build / trigger-build-image (push) Successful in 5s

Co-authored-by: zzjc1234 <2359047351@qq.com>
Reviewed-on: #48
Co-authored-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
Co-committed-by: 周赵嘉程521432910016 <zzjc123@sjtu.edu.cn>
This commit is contained in:
周赵嘉程521432910016 2024-10-08 09:10:55 +08:00 committed by 张泊明518370910136
parent 72b71e8829
commit 70012012c4
3 changed files with 7 additions and 3 deletions

View File

@ -47,6 +47,7 @@ func main() {
droneBranch := flag.String("droneBranch", "", "") droneBranch := flag.String("droneBranch", "", "")
releaseCategories := flag.String("releaseCategories", "", "") releaseCategories := flag.String("releaseCategories", "", "")
releaseNumber := flag.Int("releaseNumber", 0, "") releaseNumber := flag.Int("releaseNumber", 0, "")
mileStoneNumber := flag.Int("mileStoneNumber", 0, "")
checkFileNameList := flag.String("checkFileNameList", "", "Comma-separated list of files to check.") checkFileNameList := flag.String("checkFileNameList", "", "Comma-separated list of files to check.")
checkFileSumList := flag.String("checkFileSumList", "", "Comma-separated list of expected checksums.") checkFileSumList := flag.String("checkFileSumList", "", "Comma-separated list of expected checksums.")
parseMultiValueFlag(&gitWhitelist, "whitelist", "") parseMultiValueFlag(&gitWhitelist, "whitelist", "")
@ -78,7 +79,7 @@ func main() {
if err != nil { if err != nil {
fmt.Printf("### Non-ASCII Characters Commit Message Check Failed:\n%s\n", err.Error()) 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 { if err != nil {
fmt.Printf("### Release Tag Check Failed:\n%s\n", err.Error()) 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 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 // INFO: if category not specified, skipping this check by default
if category == "" { if category == "" {
return nil return nil
@ -52,6 +52,9 @@ func CheckTags(repoPath string, category string, n int) error {
prefix = "a" prefix = "a"
} }
target := prefix + fmt.Sprintf("%d", n) target := prefix + fmt.Sprintf("%d", n)
if category == "project" {
target += fmt.Sprintf("m%d", m)
}
found := false found := false
for _, tag := range tags { for _, tag := range tags {
if tag == target { if tag == target {