feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
// Package build provides project build commands with auto-detection.
|
|
|
|
|
package build
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"embed"
|
|
|
|
|
|
feat(shared): enhance CLI styling with lipgloss utilities
Add comprehensive styling system for consistent DX across commands:
- Tailwind colour palette as named constants (30+ colours)
- Unicode symbols for status indicators, arrows, tree chars
- New styles: InfoStyle, AccentStyle, CodeStyle, NumberStyle, etc.
- Box styles with rounded borders for panels
- Helper functions: Success(), Error(), StatusLine(), KeyValue(), etc.
- Table struct with auto-width column rendering
Also:
- Fix cmd/build to use shared styles instead of duplicating
- Update cmd/dev/dev_health to use StatusLine() helper
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 00:58:34 +00:00
|
|
|
"github.com/host-uk/core/cmd/shared"
|
2026-01-30 00:47:54 +00:00
|
|
|
"github.com/spf13/cobra"
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
)
|
|
|
|
|
|
feat(shared): enhance CLI styling with lipgloss utilities
Add comprehensive styling system for consistent DX across commands:
- Tailwind colour palette as named constants (30+ colours)
- Unicode symbols for status indicators, arrows, tree chars
- New styles: InfoStyle, AccentStyle, CodeStyle, NumberStyle, etc.
- Box styles with rounded borders for panels
- Helper functions: Success(), Error(), StatusLine(), KeyValue(), etc.
- Table struct with auto-width column rendering
Also:
- Fix cmd/build to use shared styles instead of duplicating
- Update cmd/dev/dev_health to use StatusLine() helper
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 00:58:34 +00:00
|
|
|
// Style aliases from shared package
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
var (
|
feat(shared): enhance CLI styling with lipgloss utilities
Add comprehensive styling system for consistent DX across commands:
- Tailwind colour palette as named constants (30+ colours)
- Unicode symbols for status indicators, arrows, tree chars
- New styles: InfoStyle, AccentStyle, CodeStyle, NumberStyle, etc.
- Box styles with rounded borders for panels
- Helper functions: Success(), Error(), StatusLine(), KeyValue(), etc.
- Table struct with auto-width column rendering
Also:
- Fix cmd/build to use shared styles instead of duplicating
- Update cmd/dev/dev_health to use StatusLine() helper
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 00:58:34 +00:00
|
|
|
buildHeaderStyle = shared.TitleStyle
|
|
|
|
|
buildTargetStyle = shared.ValueStyle
|
|
|
|
|
buildSuccessStyle = shared.SuccessStyle
|
|
|
|
|
buildErrorStyle = shared.ErrorStyle
|
|
|
|
|
buildDimStyle = shared.DimStyle
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
//go:embed all:tmpl/gui
|
|
|
|
|
var guiTemplate embed.FS
|
|
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
// Flags for the main build command
|
|
|
|
|
var (
|
|
|
|
|
buildType string
|
|
|
|
|
ciMode bool
|
|
|
|
|
targets string
|
|
|
|
|
outputDir string
|
|
|
|
|
doArchive bool
|
|
|
|
|
doChecksum bool
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
|
|
|
|
|
// Docker/LinuxKit specific flags
|
2026-01-30 00:47:54 +00:00
|
|
|
configPath string
|
|
|
|
|
format string
|
|
|
|
|
push bool
|
|
|
|
|
imageName string
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
|
|
|
|
|
// Signing flags
|
2026-01-30 00:47:54 +00:00
|
|
|
noSign bool
|
|
|
|
|
notarize bool
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
// from-path subcommand
|
|
|
|
|
fromPath string
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
// pwa subcommand
|
|
|
|
|
pwaURL string
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
// sdk subcommand
|
|
|
|
|
sdkSpec string
|
|
|
|
|
sdkLang string
|
|
|
|
|
sdkVersion string
|
|
|
|
|
sdkDryRun bool
|
|
|
|
|
)
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
var buildCmd = &cobra.Command{
|
|
|
|
|
Use: "build",
|
|
|
|
|
Short: "Build projects with auto-detection and cross-compilation",
|
|
|
|
|
Long: `Builds the current project with automatic type detection.
|
|
|
|
|
Supports Go, Wails, Docker, LinuxKit, and Taskfile projects.
|
|
|
|
|
Configuration can be provided via .core/build.yaml or command-line flags.
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
core build # Auto-detect and build
|
|
|
|
|
core build --type docker # Build Docker image
|
|
|
|
|
core build --type linuxkit # Build LinuxKit image
|
|
|
|
|
core build --type linuxkit --config linuxkit.yml --format qcow2-bios`,
|
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
return runProjectBuild(buildType, ciMode, targets, outputDir, doArchive, doChecksum, configPath, format, push, imageName, noSign, notarize)
|
2026-01-30 00:47:54 +00:00
|
|
|
},
|
|
|
|
|
}
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
var fromPathCmd = &cobra.Command{
|
|
|
|
|
Use: "from-path",
|
|
|
|
|
Short: "Build from a local directory.",
|
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
if fromPath == "" {
|
2026-01-30 00:22:47 +00:00
|
|
|
return errPathRequired
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
}
|
|
|
|
|
return runBuild(fromPath)
|
2026-01-30 00:47:54 +00:00
|
|
|
},
|
|
|
|
|
}
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
|
2026-01-30 00:47:54 +00:00
|
|
|
var pwaCmd = &cobra.Command{
|
|
|
|
|
Use: "pwa",
|
|
|
|
|
Short: "Build from a live PWA URL.",
|
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
if pwaURL == "" {
|
2026-01-30 00:22:47 +00:00
|
|
|
return errURLRequired
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
}
|
|
|
|
|
return runPwaBuild(pwaURL)
|
2026-01-30 00:47:54 +00:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var sdkBuildCmd = &cobra.Command{
|
|
|
|
|
Use: "sdk",
|
|
|
|
|
Short: "Generate API SDKs from OpenAPI spec",
|
|
|
|
|
Long: `Generates typed API clients from OpenAPI specifications.
|
|
|
|
|
Supports TypeScript, Python, Go, and PHP.
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
core build sdk # Generate all configured SDKs
|
|
|
|
|
core build sdk --lang typescript # Generate only TypeScript SDK
|
|
|
|
|
core build sdk --spec api.yaml # Use specific OpenAPI spec`,
|
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
return runBuildSDK(sdkSpec, sdkLang, sdkVersion, sdkDryRun)
|
2026-01-30 00:47:54 +00:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
// Main build command flags
|
|
|
|
|
buildCmd.Flags().StringVar(&buildType, "type", "", "Builder type (go, wails, docker, linuxkit, taskfile) - auto-detected if not specified")
|
|
|
|
|
buildCmd.Flags().BoolVar(&ciMode, "ci", false, "CI mode - minimal output with JSON artifact list at the end")
|
|
|
|
|
buildCmd.Flags().StringVar(&targets, "targets", "", "Comma-separated OS/arch pairs (e.g., linux/amd64,darwin/arm64)")
|
|
|
|
|
buildCmd.Flags().StringVar(&outputDir, "output", "", "Output directory for artifacts (default: dist)")
|
|
|
|
|
buildCmd.Flags().BoolVar(&doArchive, "archive", true, "Create archives (tar.gz for linux/darwin, zip for windows)")
|
|
|
|
|
buildCmd.Flags().BoolVar(&doChecksum, "checksum", true, "Generate SHA256 checksums and CHECKSUMS.txt")
|
|
|
|
|
|
|
|
|
|
// Docker/LinuxKit specific
|
|
|
|
|
buildCmd.Flags().StringVar(&configPath, "config", "", "Config file path (for linuxkit: YAML config, for docker: Dockerfile)")
|
|
|
|
|
buildCmd.Flags().StringVar(&format, "format", "", "Output format for linuxkit (iso-bios, qcow2-bios, raw, vmdk)")
|
|
|
|
|
buildCmd.Flags().BoolVar(&push, "push", false, "Push Docker image after build")
|
|
|
|
|
buildCmd.Flags().StringVar(&imageName, "image", "", "Docker image name (e.g., host-uk/core-devops)")
|
|
|
|
|
|
|
|
|
|
// Signing flags
|
|
|
|
|
buildCmd.Flags().BoolVar(&noSign, "no-sign", false, "Skip all code signing")
|
|
|
|
|
buildCmd.Flags().BoolVar(¬arize, "notarize", false, "Enable macOS notarization (requires Apple credentials)")
|
|
|
|
|
|
|
|
|
|
// from-path subcommand flags
|
|
|
|
|
fromPathCmd.Flags().StringVar(&fromPath, "path", "", "The path to the static web application files.")
|
|
|
|
|
|
|
|
|
|
// pwa subcommand flags
|
|
|
|
|
pwaCmd.Flags().StringVar(&pwaURL, "url", "", "The URL of the PWA to build.")
|
|
|
|
|
|
|
|
|
|
// sdk subcommand flags
|
|
|
|
|
sdkBuildCmd.Flags().StringVar(&sdkSpec, "spec", "", "Path to OpenAPI spec file")
|
|
|
|
|
sdkBuildCmd.Flags().StringVar(&sdkLang, "lang", "", "Generate only this language (typescript, python, go, php)")
|
|
|
|
|
sdkBuildCmd.Flags().StringVar(&sdkVersion, "version", "", "Version to embed in generated SDKs")
|
|
|
|
|
sdkBuildCmd.Flags().BoolVar(&sdkDryRun, "dry-run", false, "Show what would be generated without writing files")
|
|
|
|
|
|
|
|
|
|
// Add subcommands
|
|
|
|
|
buildCmd.AddCommand(fromPathCmd)
|
|
|
|
|
buildCmd.AddCommand(pwaCmd)
|
|
|
|
|
buildCmd.AddCommand(sdkBuildCmd)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AddBuildCommand adds the new build command and its subcommands to the cobra app.
|
|
|
|
|
func AddBuildCommand(root *cobra.Command) {
|
|
|
|
|
root.AddCommand(buildCmd)
|
feat(php): add quality commands and split cmd/php for maintainability
Add new PHP quality commands:
- psalm: Psalm static analysis with auto-fix support
- audit: Security audit for composer and npm dependencies
- security: Filesystem security checks (.env exposure, permissions)
- qa: Full QA pipeline with quick/standard/full stages
- rector: Automated code refactoring with dry-run
- infection: Mutation testing
Split cmd/php/php.go (2k+ lines) into logical files:
- php.go: Styles and command registration
- php_dev.go: dev, logs, stop, status, ssl
- php_build.go: build, serve, shell
- php_quality.go: test, fmt, analyse, psalm, audit, security, qa, rector, infection
- php_packages.go: packages link/unlink/update/list
- php_deploy.go: deploy commands
QA pipeline improvements:
- Suppress tool output noise in pipeline mode
- Show actionable "To fix:" suggestions with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:58:03 +00:00
|
|
|
}
|