feat(writers): stamp RelSpec version in generated headers; preserve DBML column order
- Add pkg/buildinfo with Version/BuildDate (set via ldflags, VCS fallback); cmd/relspec now sources version info from it - Emit "RelSpec <version> (built: <date>)" in generated file headers for bun, gorm, drizzle, pgsql (incl. migration), mssql, sqlite writers - pgsql writer: getSortedColumns now sorts by Sequence then Name so the streaming WriteSchema/WriteDatabase path preserves source column order - dbml reader: mergeTable re-bases merged-in column Sequence values past the existing max, fixing colliding sequences (and alphabetical fallback) when a table is split across multiple DBML files - Tests for bun/gorm header + column order, and dbml multi-file merge ordering
This commit is contained in:
@@ -22,7 +22,7 @@ GOVULNCHECK = go run golang.org/x/vuln/cmd/govulncheck@latest
|
||||
# Version information
|
||||
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
||||
BUILD_DATE := $(shell date -u +"%Y-%m-%d %H:%M:%S UTC")
|
||||
LDFLAGS := -X 'main.version=$(VERSION)' -X 'main.buildDate=$(BUILD_DATE)'
|
||||
LDFLAGS := -X 'git.warky.dev/wdevs/relspecgo/pkg/buildinfo.Version=$(VERSION)' -X 'git.warky.dev/wdevs/relspecgo/pkg/buildinfo.BuildDate=$(BUILD_DATE)'
|
||||
|
||||
# Auto-detect container runtime (Docker or Podman)
|
||||
CONTAINER_RUNTIME := $(shell \
|
||||
|
||||
Reference in New Issue
Block a user