From 1f1686bc4d94cde03c8694fc0ad5ac7a53bd1646 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 3 May 2026 14:38:08 +0100 Subject: [PATCH] chore: reduce root cleanup files --- .github/labeler.yml | 3 +-- .github/workflows/ci.yml | 4 ++-- zizmor.yml => .github/zizmor.yml | 0 .pre-commit-config.yaml | 13 ++++++++++--- fly.private.toml => deploy/fly.private.toml | 0 docker-setup.sh | 12 ------------ docs/install/fly.md | 8 ++++---- scripts/changed-lanes.mjs | 2 +- scripts/ci-changed-scope.mjs | 2 +- scripts/clawdock/README.md | 6 +++--- scripts/run-openclaw-podman.sh | 4 ---- setup-podman.sh | 12 ------------ pyproject.toml => skills/pyproject.toml | 0 test/scripts/changed-lanes.test.ts | 4 ++++ 14 files changed, 26 insertions(+), 44 deletions(-) rename zizmor.yml => .github/zizmor.yml (100%) rename fly.private.toml => deploy/fly.private.toml (100%) delete mode 100755 docker-setup.sh delete mode 100755 setup-podman.sh rename pyproject.toml => skills/pyproject.toml (100%) diff --git a/.github/labeler.yml b/.github/labeler.yml index 9e9af7240a8..e7a7ce574b3 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -217,9 +217,8 @@ - "Dockerfile" - "Dockerfile.*" - "docker-compose.yml" - - "docker-setup.sh" - - "setup-podman.sh" - ".dockerignore" + - "deploy/fly.private.toml" - "scripts/docker/setup.sh" - "scripts/docker/sandbox/Dockerfile*" - "scripts/podman/setup.sh" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7cfbf0af5f..a4d4df94867 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1769,10 +1769,10 @@ jobs: python -m pip install pytest ruff pyyaml - name: Lint Python skill scripts - run: python -m ruff check skills + run: python -m ruff check --config skills/pyproject.toml skills - name: Test skill Python scripts - run: python -m pytest -q skills + run: python -m pytest -q -c skills/pyproject.toml skills checks-windows: permissions: diff --git a/zizmor.yml b/.github/zizmor.yml similarity index 100% rename from zizmor.yml rename to .github/zizmor.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 28f6017b4c8..c917f63d3ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,14 @@ repos: rev: v1.22.0 hooks: - id: zizmor - args: [--persona=regular, --min-severity=medium, --min-confidence=medium] + args: + [ + --config, + .github/zizmor.yml, + --persona=regular, + --min-severity=medium, + --min-confidence=medium, + ] exclude: "^(vendor/|apps/swabble/)" # Python checks for skills scripts @@ -49,13 +56,13 @@ repos: hooks: - id: ruff files: "^skills/.*\\.py$" - args: [--config, pyproject.toml] + args: [--config, skills/pyproject.toml] - repo: local hooks: - id: skills-python-tests name: skills python tests - entry: pytest -q skills + entry: pytest -q -c skills/pyproject.toml skills language: python additional_dependencies: [pytest>=8, <9] pass_filenames: false diff --git a/fly.private.toml b/deploy/fly.private.toml similarity index 100% rename from fly.private.toml rename to deploy/fly.private.toml diff --git a/docker-setup.sh b/docker-setup.sh deleted file mode 100755 index e8d6335bf42..00000000000 --- a/docker-setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -SCRIPT_PATH="$ROOT_DIR/scripts/docker/setup.sh" - -if [[ ! -f "$SCRIPT_PATH" ]]; then - echo "Docker setup script not found at $SCRIPT_PATH" >&2 - exit 1 -fi - -exec "$SCRIPT_PATH" "$@" diff --git a/docs/install/fly.md b/docs/install/fly.md index 2c13a73330b..dff5e5c6d8d 100644 --- a/docs/install/fly.md +++ b/docs/install/fly.md @@ -45,7 +45,7 @@ read_when: Edit `fly.toml` to match your app name and requirements. - **Security note:** The default config exposes a public URL. For a hardened deployment with no public IP, see [Private Deployment](#private-deployment-hardened) or use `fly.private.toml`. + **Security note:** The default config exposes a public URL. For a hardened deployment with no public IP, see [Private Deployment](#private-deployment-hardened) or use `deploy/fly.private.toml`. ```toml app = "my-openclaw" # Your app name @@ -392,11 +392,11 @@ For a hardened deployment with **no public exposure**, use the private template. ### Setup -Use `fly.private.toml` instead of the standard config: +Use `deploy/fly.private.toml` instead of the standard config: ```bash # Deploy with private config -fly deploy -c fly.private.toml +fly deploy -c deploy/fly.private.toml ``` Or convert an existing deployment: @@ -411,7 +411,7 @@ fly ips release -a my-openclaw # Switch to private config so future deploys don't re-allocate public IPs # (remove [http_service] or deploy with the private template) -fly deploy -c fly.private.toml +fly deploy -c deploy/fly.private.toml # Allocate private-only IPv6 fly ips allocate-v6 --private -a my-openclaw diff --git a/scripts/changed-lanes.mjs b/scripts/changed-lanes.mjs index 59ab2d3e2bc..b011710f05e 100644 --- a/scripts/changed-lanes.mjs +++ b/scripts/changed-lanes.mjs @@ -9,7 +9,7 @@ const APP_PATH_RE = /^(?:apps\/|Swabble\/|appcast\.xml$)/u; const EXTENSION_PATH_RE = /^extensions\/[^/]+(?:\/|$)/u; const CORE_PATH_RE = /^(?:src\/|ui\/|packages\/)/u; const TOOLING_PATH_RE = - /^(?:scripts\/|test\/vitest\/|\.github\/|\.vscode\/|git-hooks\/|Dockerfile\.sandbox(?:-(?:browser|common))?$|Makefile$|openclaw\.podman\.env$|vitest(?:\..+)?\.config\.ts$|tsconfig.*\.json$|\.dockerignore$|\.gitignore$|\.jscpd\.json$|\.npmignore$|\.pre-commit-config\.yaml$|\.swiftformat$|\.oxlint.*|\.oxfmt.*)/u; + /^(?:scripts\/|test\/vitest\/|\.github\/|\.vscode\/|deploy\/|git-hooks\/|Dockerfile\.sandbox(?:-(?:browser|common))?$|Makefile$|docker-setup\.sh$|setup-podman\.sh$|openclaw\.podman\.env$|skills\/pyproject\.toml$|vitest(?:\..+)?\.config\.ts$|tsconfig.*\.json$|\.dockerignore$|\.gitignore$|\.jscpd\.json$|\.npmignore$|\.pre-commit-config\.yaml$|\.swiftformat$|\.oxlint.*|\.oxfmt.*)/u; const ROOT_GLOBAL_PATH_RE = /^(?:package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|tsdown\.config\.ts$|vitest\.config\.ts$)/u; const LEGACY_ROOT_ASSET_PATH_RE = /^assets\//u; diff --git a/scripts/ci-changed-scope.mjs b/scripts/ci-changed-scope.mjs index aeb9a19a586..809b64efff2 100644 --- a/scripts/ci-changed-scope.mjs +++ b/scripts/ci-changed-scope.mjs @@ -26,7 +26,7 @@ const EMPTY_SCOPE = { }; const DOCS_PATH_RE = /^(docs\/|.*\.mdx?$)/; -const SKILLS_PYTHON_SCOPE_RE = /^(skills\/|pyproject\.toml$)/; +const SKILLS_PYTHON_SCOPE_RE = /^(skills\/|skills\/pyproject\.toml$)/; const INSTALL_SMOKE_WORKFLOW_SCOPE_RE = /^\.github\/workflows\/install-smoke\.yml$/; const MACOS_PROTOCOL_GEN_RE = /^(apps\/macos\/Sources\/OpenClawProtocol\/|apps\/shared\/OpenClawKit\/Sources\/OpenClawProtocol\/)/; diff --git a/scripts/clawdock/README.md b/scripts/clawdock/README.md index 765bc4277c7..a09c6a503d0 100644 --- a/scripts/clawdock/README.md +++ b/scripts/clawdock/README.md @@ -145,7 +145,7 @@ The Docker setup uses three config files on the host. The container never stores | -------------------------- | -------------------------------------------------------------------------- | | `Dockerfile` | Builds the `openclaw:local` image (Node 22, pnpm, non-root `node` user) | | `docker-compose.yml` | Defines `openclaw-gateway` and `openclaw-cli` services, bind-mounts, ports | -| `docker-setup.sh` | First-time setup — builds image, creates `.env` from `.env.example` | +| `scripts/docker/setup.sh` | First-time setup — builds image, creates `.env` from `.env.example` | | `.env.example` | Template for `/.env` with all supported vars and docs | | `docker-compose.extra.yml` | Optional overrides — auto-loaded by ClawDock helpers if present | @@ -161,14 +161,14 @@ The Docker setup uses three config files on the host. The container never stores ### Initial Setup -`./docker-setup.sh` (in the project root) handles first-time Docker configuration: +`./scripts/docker/setup.sh` handles first-time Docker configuration: - Builds the `openclaw:local` image from `Dockerfile` - Creates `/.env` from `.env.example` with a generated gateway token - Sets up `~/.openclaw` directories if they don't exist ```bash -./docker-setup.sh +./scripts/docker/setup.sh ``` After setup, add your API keys: diff --git a/scripts/run-openclaw-podman.sh b/scripts/run-openclaw-podman.sh index 75fbdb289f7..be7bc5072ff 100755 --- a/scripts/run-openclaw-podman.sh +++ b/scripts/run-openclaw-podman.sh @@ -208,10 +208,6 @@ if [[ "${1:-}" == "setup-host" ]]; then if [[ -f "$SETUP_PODMAN" ]]; then exec "$SETUP_PODMAN" "$@" fi - SETUP_PODMAN="$REPO_ROOT/setup-podman.sh" - if [[ -f "$SETUP_PODMAN" ]]; then - exec "$SETUP_PODMAN" "$@" - fi echo "Podman setup script not found. Run from repo root: ./scripts/podman/setup.sh" >&2 exit 1 fi diff --git a/setup-podman.sh b/setup-podman.sh deleted file mode 100755 index 50a17a57bb0..00000000000 --- a/setup-podman.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -SCRIPT_PATH="$ROOT_DIR/scripts/podman/setup.sh" - -if [[ ! -f "$SCRIPT_PATH" ]]; then - echo "Podman setup script not found at $SCRIPT_PATH" >&2 - exit 1 -fi - -exec "$SCRIPT_PATH" "$@" diff --git a/pyproject.toml b/skills/pyproject.toml similarity index 100% rename from pyproject.toml rename to skills/pyproject.toml diff --git a/test/scripts/changed-lanes.test.ts b/test/scripts/changed-lanes.test.ts index d2a4097cb18..b02a677f832 100644 --- a/test/scripts/changed-lanes.test.ts +++ b/test/scripts/changed-lanes.test.ts @@ -328,7 +328,11 @@ describe("scripts/changed-lanes", () => { ".pre-commit-config.yaml", ".swiftformat", "Makefile", + "deploy/fly.private.toml", + "docker-setup.sh", "openclaw.podman.env", + "setup-podman.sh", + "skills/pyproject.toml", ]); const plan = createChangedCheckPlan(result);