chore: simplify workflows and unify tool logging and mail presentation
Release / Validate Templates (push) Successful in 2m55s
Release / Package & Release (push) Skipped
Release / Remind to Update Release Documentation (push) Skipped

This commit is contained in:
KenanZhu committed 2026-10-10 14:54:40 +08:00
1 parent f4d96de79e
commit c93f2bf8b2
40 files changed
+523 -1515

No files matched your search

+3 -2
View File
@@ -2,6 +2,7 @@ package cli
import (
"fmt"
"gitea-mail-templates/tools/logging"
"os"
"path/filepath"
@@ -44,7 +45,7 @@ func runDelete(c *cli.Context) error {
}
if _, err := os.Stat(styleDir); os.IsNotExist(err) {
fmt.Printf("\033[33m[W]\033[0m [CLI] '%s' does not exist, skipped\n", styleName)
logging.Warn("CLI", "'%s' does not exist, skipped", styleName)
continue
}
if _, err := builder.LoadTheme(styleDir); err != nil {
@@ -54,7 +55,7 @@ func runDelete(c *cli.Context) error {
if err := os.RemoveAll(styleDir); err != nil {
return fmt.Errorf("cannot delete %s: %w", styleDir, err)
}
fmt.Printf("\033[32m[I]\033[0m [CLI] Deleted style '%s'\n", styleName)
logging.Info("CLI", "Deleted style '%s'", styleName)
}
return nil