This commit is contained in:
Mike Schwörer 2023-06-07 12:39:21 +02:00
parent fe9ebf0bab
commit 8affa81bb9
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 9 additions and 3 deletions

View File

@ -10,6 +10,7 @@ import (
"gogs.mikescher.com/BlackForestBytes/goext/rext" "gogs.mikescher.com/BlackForestBytes/goext/rext"
"io" "io"
"os" "os"
"path"
"regexp" "regexp"
"strings" "strings"
"time" "time"
@ -54,8 +55,10 @@ func GenerateEnumSpecs(sourceDir string, destFile string) error {
} }
} }
newChecksumStr := goext.GoextVersion langext.ArrFilter(files, func(v os.DirEntry) bool { return v.Name() != path.Base(destFile) })
langext.SortBy(files, func(v os.DirEntry) string { return v.Name() }) langext.SortBy(files, func(v os.DirEntry) string { return v.Name() })
newChecksumStr := goext.GoextVersion
for _, f := range files { for _, f := range files {
content, err := os.ReadFile(destFile) content, err := os.ReadFile(destFile)
if err != nil { if err != nil {
@ -81,6 +84,9 @@ func GenerateEnumSpecs(sourceDir string, destFile string) error {
if !strings.HasSuffix(f.Name(), ".go") { if !strings.HasSuffix(f.Name(), ".go") {
continue continue
} }
if f.Name() == path.Base(destFile) {
continue
}
fmt.Printf("========= %s =========\n\n", f.Name()) fmt.Printf("========= %s =========\n\n", f.Name())
fileEnums, pn, err := processFile(f.Name()) fileEnums, pn, err := processFile(f.Name())

View File

@ -1,5 +1,5 @@
package goext package goext
const GoextVersion = "0.0.143" const GoextVersion = "0.0.144"
const GoextVersionTimestamp = "2023-06-07T12:36:41+0200" const GoextVersionTimestamp = "2023-06-07T12:39:21+0200"