mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
chore: reduce root cleanup files
This commit is contained in:
3
.github/labeler.yml
vendored
3
.github/labeler.yml
vendored
@@ -217,9 +217,8 @@
|
|||||||
- "Dockerfile"
|
- "Dockerfile"
|
||||||
- "Dockerfile.*"
|
- "Dockerfile.*"
|
||||||
- "docker-compose.yml"
|
- "docker-compose.yml"
|
||||||
- "docker-setup.sh"
|
|
||||||
- "setup-podman.sh"
|
|
||||||
- ".dockerignore"
|
- ".dockerignore"
|
||||||
|
- "deploy/fly.private.toml"
|
||||||
- "scripts/docker/setup.sh"
|
- "scripts/docker/setup.sh"
|
||||||
- "scripts/docker/sandbox/Dockerfile*"
|
- "scripts/docker/sandbox/Dockerfile*"
|
||||||
- "scripts/podman/setup.sh"
|
- "scripts/podman/setup.sh"
|
||||||
|
|||||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -1769,10 +1769,10 @@ jobs:
|
|||||||
python -m pip install pytest ruff pyyaml
|
python -m pip install pytest ruff pyyaml
|
||||||
|
|
||||||
- name: Lint Python skill scripts
|
- 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
|
- name: Test skill Python scripts
|
||||||
run: python -m pytest -q skills
|
run: python -m pytest -q -c skills/pyproject.toml skills
|
||||||
|
|
||||||
checks-windows:
|
checks-windows:
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
0
zizmor.yml → .github/zizmor.yml
vendored
0
zizmor.yml → .github/zizmor.yml
vendored
@@ -40,7 +40,14 @@ repos:
|
|||||||
rev: v1.22.0
|
rev: v1.22.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: zizmor
|
- 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/)"
|
exclude: "^(vendor/|apps/swabble/)"
|
||||||
|
|
||||||
# Python checks for skills scripts
|
# Python checks for skills scripts
|
||||||
@@ -49,13 +56,13 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
files: "^skills/.*\\.py$"
|
files: "^skills/.*\\.py$"
|
||||||
args: [--config, pyproject.toml]
|
args: [--config, skills/pyproject.toml]
|
||||||
|
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: skills-python-tests
|
- id: skills-python-tests
|
||||||
name: skills python tests
|
name: skills python tests
|
||||||
entry: pytest -q skills
|
entry: pytest -q -c skills/pyproject.toml skills
|
||||||
language: python
|
language: python
|
||||||
additional_dependencies: [pytest>=8, <9]
|
additional_dependencies: [pytest>=8, <9]
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|||||||
@@ -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" "$@"
|
|
||||||
@@ -45,7 +45,7 @@ read_when:
|
|||||||
<Step title="Configure fly.toml">
|
<Step title="Configure fly.toml">
|
||||||
Edit `fly.toml` to match your app name and requirements.
|
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
|
```toml
|
||||||
app = "my-openclaw" # Your app name
|
app = "my-openclaw" # Your app name
|
||||||
@@ -392,11 +392,11 @@ For a hardened deployment with **no public exposure**, use the private template.
|
|||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
Use `fly.private.toml` instead of the standard config:
|
Use `deploy/fly.private.toml` instead of the standard config:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Deploy with private config
|
# Deploy with private config
|
||||||
fly deploy -c fly.private.toml
|
fly deploy -c deploy/fly.private.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
Or convert an existing deployment:
|
Or convert an existing deployment:
|
||||||
@@ -411,7 +411,7 @@ fly ips release <public-ipv6> -a my-openclaw
|
|||||||
|
|
||||||
# Switch to private config so future deploys don't re-allocate public IPs
|
# Switch to private config so future deploys don't re-allocate public IPs
|
||||||
# (remove [http_service] or deploy with the private template)
|
# (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
|
# Allocate private-only IPv6
|
||||||
fly ips allocate-v6 --private -a my-openclaw
|
fly ips allocate-v6 --private -a my-openclaw
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const APP_PATH_RE = /^(?:apps\/|Swabble\/|appcast\.xml$)/u;
|
|||||||
const EXTENSION_PATH_RE = /^extensions\/[^/]+(?:\/|$)/u;
|
const EXTENSION_PATH_RE = /^extensions\/[^/]+(?:\/|$)/u;
|
||||||
const CORE_PATH_RE = /^(?:src\/|ui\/|packages\/)/u;
|
const CORE_PATH_RE = /^(?:src\/|ui\/|packages\/)/u;
|
||||||
const TOOLING_PATH_RE =
|
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 =
|
const ROOT_GLOBAL_PATH_RE =
|
||||||
/^(?:package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|tsdown\.config\.ts$|vitest\.config\.ts$)/u;
|
/^(?:package\.json$|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|tsdown\.config\.ts$|vitest\.config\.ts$)/u;
|
||||||
const LEGACY_ROOT_ASSET_PATH_RE = /^assets\//u;
|
const LEGACY_ROOT_ASSET_PATH_RE = /^assets\//u;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const EMPTY_SCOPE = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const DOCS_PATH_RE = /^(docs\/|.*\.mdx?$)/;
|
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 INSTALL_SMOKE_WORKFLOW_SCOPE_RE = /^\.github\/workflows\/install-smoke\.yml$/;
|
||||||
const MACOS_PROTOCOL_GEN_RE =
|
const MACOS_PROTOCOL_GEN_RE =
|
||||||
/^(apps\/macos\/Sources\/OpenClawProtocol\/|apps\/shared\/OpenClawKit\/Sources\/OpenClawProtocol\/)/;
|
/^(apps\/macos\/Sources\/OpenClawProtocol\/|apps\/shared\/OpenClawKit\/Sources\/OpenClawProtocol\/)/;
|
||||||
|
|||||||
@@ -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) |
|
| `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-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 `<project>/.env` with all supported vars and docs |
|
| `.env.example` | Template for `<project>/.env` with all supported vars and docs |
|
||||||
| `docker-compose.extra.yml` | Optional overrides — auto-loaded by ClawDock helpers if present |
|
| `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
|
### 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`
|
- Builds the `openclaw:local` image from `Dockerfile`
|
||||||
- Creates `<project>/.env` from `.env.example` with a generated gateway token
|
- Creates `<project>/.env` from `.env.example` with a generated gateway token
|
||||||
- Sets up `~/.openclaw` directories if they don't exist
|
- Sets up `~/.openclaw` directories if they don't exist
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./docker-setup.sh
|
./scripts/docker/setup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
After setup, add your API keys:
|
After setup, add your API keys:
|
||||||
|
|||||||
@@ -208,10 +208,6 @@ if [[ "${1:-}" == "setup-host" ]]; then
|
|||||||
if [[ -f "$SETUP_PODMAN" ]]; then
|
if [[ -f "$SETUP_PODMAN" ]]; then
|
||||||
exec "$SETUP_PODMAN" "$@"
|
exec "$SETUP_PODMAN" "$@"
|
||||||
fi
|
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
|
echo "Podman setup script not found. Run from repo root: ./scripts/podman/setup.sh" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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" "$@"
|
|
||||||
@@ -328,7 +328,11 @@ describe("scripts/changed-lanes", () => {
|
|||||||
".pre-commit-config.yaml",
|
".pre-commit-config.yaml",
|
||||||
".swiftformat",
|
".swiftformat",
|
||||||
"Makefile",
|
"Makefile",
|
||||||
|
"deploy/fly.private.toml",
|
||||||
|
"docker-setup.sh",
|
||||||
"openclaw.podman.env",
|
"openclaw.podman.env",
|
||||||
|
"setup-podman.sh",
|
||||||
|
"skills/pyproject.toml",
|
||||||
]);
|
]);
|
||||||
const plan = createChangedCheckPlan(result);
|
const plan = createChangedCheckPlan(result);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user