fix(writers): drop version stamps from generated output
Generated files carried the RelSpec version and build date, so every rebuild produced a diff even when the schema was unchanged. - bun, gorm, drizzle: remove the GeneratedBy template field and line - pgsql, mssql, sqlite: emit a constant "-- Generated by RelSpec" - bun: replace the version header test with a version-free assertion pkg/buildinfo is unchanged and still backs the CLI version.
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"git.warky.dev/wdevs/relspecgo/pkg/buildinfo"
|
||||
"git.warky.dev/wdevs/relspecgo/pkg/models"
|
||||
"git.warky.dev/wdevs/relspecgo/pkg/writers"
|
||||
)
|
||||
@@ -12,7 +11,6 @@ import (
|
||||
// TemplateData represents the data passed to the template for code generation
|
||||
type TemplateData struct {
|
||||
PackageName string
|
||||
GeneratedBy string
|
||||
Imports []string
|
||||
Models []*ModelData
|
||||
Config *MethodConfig
|
||||
@@ -81,7 +79,6 @@ func NewTemplateData(packageName string, config *MethodConfig) *TemplateData {
|
||||
|
||||
return &TemplateData{
|
||||
PackageName: packageName,
|
||||
GeneratedBy: buildinfo.GeneratedComment(),
|
||||
Imports: make([]string, 0),
|
||||
Models: make([]*ModelData, 0),
|
||||
Config: config,
|
||||
|
||||
Reference in New Issue
Block a user