chore: replace Taskfile with .core/build.yaml
Build config now in .core/build.yaml — `core build` handles CGO=0 default builds. FrankenPHP (CGO=1) handled separately. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
a36ae054c0
commit
35d31be9cf
2 changed files with 28 additions and 23 deletions
28
.core/build.yaml
Normal file
28
.core/build.yaml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Core PHP build configuration
|
||||
# Used by: core build
|
||||
|
||||
version: 1
|
||||
|
||||
project:
|
||||
name: core-php
|
||||
description: PHP development CLI with FrankenPHP integration
|
||||
main: ./cmd/core-php
|
||||
binary: core-php
|
||||
|
||||
build:
|
||||
cgo: false
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -s
|
||||
- -w
|
||||
|
||||
targets:
|
||||
- os: linux
|
||||
arch: amd64
|
||||
- os: linux
|
||||
arch: arm64
|
||||
- os: darwin
|
||||
arch: arm64
|
||||
- os: windows
|
||||
arch: amd64
|
||||
23
Taskfile.yml
23
Taskfile.yml
|
|
@ -1,23 +0,0 @@
|
|||
version: '3'
|
||||
|
||||
tasks:
|
||||
build:
|
||||
desc: Build core-php binary
|
||||
cmds:
|
||||
- CGO_ENABLED=0 go build -o ./bin/core-php ./cmd/core-php
|
||||
|
||||
build-frankenphp:
|
||||
desc: Build with FrankenPHP support (needs PHP-ZTS)
|
||||
cmds:
|
||||
- go build -o ./bin/core-php ./cmd/core-php
|
||||
|
||||
test:
|
||||
desc: Run tests
|
||||
cmds:
|
||||
- CGO_ENABLED=0 go test ./...
|
||||
|
||||
run:
|
||||
desc: Build and run
|
||||
cmds:
|
||||
- task: build
|
||||
- ./bin/core-php {{.CLI_ARGS}}
|
||||
Reference in a new issue