feat(release): update release process to include linting and testing

This commit is contained in:
2026-09-10 22:21:40 +02:00
parent 19a2cc1fe3
commit ca226e83df
6 changed files with 28 additions and 6 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ docker-test-integration: docker-up ## Start DB and run integration tests
$(GOTEST) -v ./pkg/readers/pgsql/ -count=1 || (make docker-down && exit 1) $(GOTEST) -v ./pkg/readers/pgsql/ -count=1 || (make docker-down && exit 1)
@make docker-down @make docker-down
release: ## Create and push a new release tag (auto-increments patch version) release: lint fmt-check test build ## Run lint, format check, tests, build, then create and push a new release tag
@echo "Creating new release..." @echo "Creating new release..."
@latest_tag=$$(git describe --tags --abbrev=0 2>/dev/null || echo ""); \ @latest_tag=$$(git describe --tags --abbrev=0 2>/dev/null || echo ""); \
if [ -z "$$latest_tag" ]; then \ if [ -z "$$latest_tag" ]; then \
+2
View File
@@ -5,6 +5,8 @@ import (
"os" "os"
) )
// asciiLogo (see version.go) is printed by the `version` command.
func main() { func main() {
args := os.Args[1:] args := os.Args[1:]
isSilent := hasSilentFlag(args) isSilent := hasSilentFlag(args)
+2 -1
View File
@@ -3,8 +3,9 @@ package main
import ( import (
"fmt" "fmt"
"git.warky.dev/wdevs/relspecgo/pkg/buildinfo"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"git.warky.dev/wdevs/relspecgo/pkg/buildinfo"
) )
// version/buildDate mirror pkg/buildinfo so existing call sites keep working. // version/buildDate mirror pkg/buildinfo so existing call sites keep working.
+5 -2
View File
@@ -4,13 +4,16 @@ import (
"fmt" "fmt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"git.warky.dev/wdevs/relspecgo/pkg/buildinfo"
) )
var versionCmd = &cobra.Command{ var versionCmd = &cobra.Command{
Use: "version", Use: "version",
Short: "Print version information", Short: "Print version information",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("RelSpec %s\n", version) fmt.Print(buildinfo.AsciiLogo)
fmt.Printf("Built: %s\n", buildDate) fmt.Printf("RelSpec %s\n", buildinfo.Version)
fmt.Printf("Built: %s\n", buildinfo.BuildDate)
}, },
} }
+16
View File
@@ -47,3 +47,19 @@ func init() {
func GeneratedComment() string { func GeneratedComment() string {
return fmt.Sprintf("RelSpec %s (built: %s)", Version, BuildDate) return fmt.Sprintf("RelSpec %s (built: %s)", Version, BuildDate)
} }
const AsciiLogo = `
██████╗ ███████╗██╗ ███████╗██████╗ ███████╗ ██████╗
██╔══██╗██╔════╝██║ ██╔════╝██╔══██╗██╔════╝██╔════╝
██████╔╝█████╗ ██║ ███████╗██████╔╝█████╗ ██║
██╔══██╗██╔══╝ ██║ ╚════██║██╔═══╝ ██╔══╝ ██║
██║ ██║███████╗███████╗███████║██║ ███████╗╚██████╗
╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚══════╝ ╚═════╝
[ IN ] ──▶ [ RELSPEC ] ──▶ [ OUT ]
╔══════════════════════════════════════╗
║ ║
║ © WARKY DEVS ║
║ Author: Hein (hein@warky.dev) ║
║ ║
╚══════════════════════════════════════╝
`