From 754fa84a5e7c09bfd5aa3f5452fff93662252fcd Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 5 Oct 2026 08:50:12 +0200 Subject: [PATCH] fix: remove unused variables and ignore certs/README.md when build image --- .dockerignore | 3 ++- build.sh | 2 +- certs/README.md | 3 +-- run.sh | 9 --------- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.dockerignore b/.dockerignore index 15b6b40..f7f48a1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ .git .gitignore -README.md *.log +README.md +certs/README.md diff --git a/build.sh b/build.sh index d71ed15..5c3a95f 100755 --- a/build.sh +++ b/build.sh @@ -11,7 +11,7 @@ IMAGE="${IMAGE_REPO:-localhost/opencode-dev}" usage() { echo 'Usage: $0 [--no-cache] [--update] [--dry-run] [--remove] [--prune] [--apt-packages="pack1 pack2"]' - exit 2 + exit 0 } BUILD_OPTS=() diff --git a/certs/README.md b/certs/README.md index 04b75de..2aadefb 100644 --- a/certs/README.md +++ b/certs/README.md @@ -50,8 +50,7 @@ so both system tools and Node.js applications trust the added certificates. * Only **public** CA certificates belong here. Never commit private material (`*.key`, `*.p12`, `*.pfx`) — everything matched here is copied into the image - verbatim. The `.gitignore` in this directory blocks those extensions, but it - is a safety net, not a guarantee. + verbatim. * Files must be PEM encoded. Convert DER with: ```bash diff --git a/run.sh b/run.sh index 8b05196..066f901 100755 --- a/run.sh +++ b/run.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -SCRIPT_DIR=$(realpath -- "$(dirname -- "${BASH_SOURCE[0]}")") - IMAGE_REPO="${IMAGE_REPO:-localhost/opencode-dev}" IMAGE="${IMAGE_REPO}" @@ -18,15 +16,9 @@ OPC_CONFIG="${OPENCODE_CONFIG:-$BASE_DIR/opencode-config}" OPC_DATA="${OPENCODE_SHARE_DATA:-$BASE_DIR/opencode-data}" OPC_CACHE="${OPENCODE_CACHE:-$BASE_DIR/opencode-cache}" M2_FOLDER="${M2_FOLDER:-$BASE_DIR/m2}" -NPM_MODULES="${NPM_MODULES:-$BASE_DIR/npm-modules}" NPM_CACHE="${NPM_CACHE:-$BASE_DIR/npm-cache}" PIP_CACHE="${PIP_CACHE:-$BASE_DIR/pip-cache}" -if [[ ! -d "$PROJECTS_DIR" ]]; then - echo "Project directory missing: $PROJECTS_DIR" >&2 - exit 1 -fi - mkdir -p \ "$BASE_DIR" \ "$PROJECTS_DIR" \ @@ -34,7 +26,6 @@ mkdir -p \ "$OPC_DATA" \ "$OPC_CACHE" \ "$M2_FOLDER" \ - "$NPM_MODULES" \ "$NPM_CACHE" \ "$PIP_CACHE"