feat(release): update release process to include linting and testing
This commit is contained in:
@@ -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)
|
||||
@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..."
|
||||
@latest_tag=$$(git describe --tags --abbrev=0 2>/dev/null || echo ""); \
|
||||
if [ -z "$$latest_tag" ]; then \
|
||||
|
||||
@@ -5,6 +5,8 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// asciiLogo (see version.go) is printed by the `version` command.
|
||||
|
||||
func main() {
|
||||
args := os.Args[1:]
|
||||
isSilent := hasSilentFlag(args)
|
||||
|
||||
+2
-1
@@ -3,8 +3,9 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.warky.dev/wdevs/relspecgo/pkg/buildinfo"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"git.warky.dev/wdevs/relspecgo/pkg/buildinfo"
|
||||
)
|
||||
|
||||
// version/buildDate mirror pkg/buildinfo so existing call sites keep working.
|
||||
|
||||
@@ -4,13 +4,16 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"git.warky.dev/wdevs/relspecgo/pkg/buildinfo"
|
||||
)
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print version information",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Printf("RelSpec %s\n", version)
|
||||
fmt.Printf("Built: %s\n", buildDate)
|
||||
fmt.Print(buildinfo.AsciiLogo)
|
||||
fmt.Printf("RelSpec %s\n", buildinfo.Version)
|
||||
fmt.Printf("Built: %s\n", buildinfo.BuildDate)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -47,3 +47,19 @@ func init() {
|
||||
func GeneratedComment() string {
|
||||
return fmt.Sprintf("RelSpec %s (built: %s)", Version, BuildDate)
|
||||
}
|
||||
|
||||
const AsciiLogo = `
|
||||
██████╗ ███████╗██╗ ███████╗██████╗ ███████╗ ██████╗
|
||||
██╔══██╗██╔════╝██║ ██╔════╝██╔══██╗██╔════╝██╔════╝
|
||||
██████╔╝█████╗ ██║ ███████╗██████╔╝█████╗ ██║
|
||||
██╔══██╗██╔══╝ ██║ ╚════██║██╔═══╝ ██╔══╝ ██║
|
||||
██║ ██║███████╗███████╗███████║██║ ███████╗╚██████╗
|
||||
╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚══════╝ ╚═════╝
|
||||
[ IN ] ──▶ [ RELSPEC ] ──▶ [ OUT ]
|
||||
╔══════════════════════════════════════╗
|
||||
║ ║
|
||||
║ © WARKY DEVS ║
|
||||
║ Author: Hein (hein@warky.dev) ║
|
||||
║ ║
|
||||
╚══════════════════════════════════════╝
|
||||
`
|
||||
|
||||
@@ -63,8 +63,8 @@ func NewTemplateData() *TemplateData {
|
||||
return &TemplateData{
|
||||
GeneratedBy: buildinfo.GeneratedComment(),
|
||||
Imports: make([]string, 0),
|
||||
Enums: make([]*EnumData, 0),
|
||||
Tables: make([]*TableData, 0),
|
||||
Enums: make([]*EnumData, 0),
|
||||
Tables: make([]*TableData, 0),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user