mirror of
https://github.com/storytold/texturecraft.git
synced 2026-11-28 17:19:24 +01:00
* texturecraft-cli: follow RFC-0018 (clap, thiserror, run(args, out, err), packaged completions and man pages) Closes #866. Part of storytold/craft-contrib#95. * fix(cli): enable clap env, and close replacement and token gaps - Enable clap's `env` feature so TEXTURECRAFT_CONTROL_TOKEN compiles in a standalone `-p texturecraft-cli` release build (the FreeBSD package job). - An inherited token no longer implies --bridge; only a command-line --token does. - Compare run/bake/new outputs to the path Headless::save actually writes (it appends .tcraft when the extension is missing). - Apply the same replacement rule to batch (save vs open), with --in-place. - Build man-and-completions for the host when CARGO_BUILD_TARGET is set. - Don't panic in the blank-token test when the environment already has a token. * fix(cli): require both roots for headless mcp AGENTS.md rule 18 says an agent entry point must refuse to start without --automation-read-root and --automation-write-root (the --read-root / --write-root aliases here). Headless mcp now exits 2 unless both are set; --bridge is unchanged. The missing-CLI_DOCS diagnostic also names the host-example env -u CARGO_BUILD_TARGET prefix already used to build it.
46 lines
2.0 KiB
YAML
46 lines
2.0 KiB
YAML
# Quick static checks for the release pipeline (seconds, no Rust build): workflow syntax,
|
|
# packaging shell/PowerShell scripts, and the Linux desktop/AppStream/Flatpak metadata.
|
|
name: Packaging lint
|
|
|
|
on:
|
|
push:
|
|
branches: [main, release]
|
|
paths: [".github/workflows/**", "packaging/**", "assets/app-icon/**"]
|
|
pull_request:
|
|
paths: [".github/workflows/**", "packaging/**", "assets/app-icon/**"]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: packaging-lint-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
# Intentionally tracked at @main (not SHA-pinned) so org-wide CI improvements, security fixes, and build optimizations propagate without PR churn across all craftapp repos.
|
|
uses: storytold/craft-common-actions/.github/workflows/packaging-lint.yml@main
|
|
with:
|
|
# Runs the Nightly synthetic suites, the launcher tests and `bash -n` here, so the checks
|
|
# that need no compiler are part of CI rather than a local step.
|
|
extra-checks-script: packaging/nightly-checks.sh
|
|
|
|
freebsd-layout:
|
|
# The FreeBSD package layout, with stub binaries standing in for the build: RFC-0018 rule 1.9
|
|
# puts texturecraft-cli's man pages and its bash, zsh and fish completions in it.
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: FreeBSD package layout (dry run)
|
|
run: |
|
|
CARGO_TARGET_DIR="$RUNNER_TEMP/texturecraft-target" bash packaging/freebsd/package.sh --dry-run
|
|
listing="$(tar -tzf "$RUNNER_TEMP"/texturecraft-target/freebsd-package/texturecraft-*-freebsd-x86_64.tar.gz)"
|
|
for f in man/man1/texturecraft-cli.1 share/bash-completion/completions/texturecraft-cli \
|
|
share/zsh/site-functions/_texturecraft-cli share/fish/vendor_completions.d/texturecraft-cli.fish; do
|
|
grep -q "/$f$" <<<"$listing" || { echo "::error::$f is missing from the FreeBSD package"; exit 1; }
|
|
done
|