From c77acbfd7a95f67d1eaf5988b19fc8b6a0563482 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 12 Aug 2026 21:50:52 +0200 Subject: [PATCH 1/5] chore(devcontainer): align SCORE devcontainer versions --- {tools => .devcontainer}/run_tool.sh | 27 +++++++++++++++++++-------- .pre-commit-config.yaml | 6 +++--- 2 files changed, 22 insertions(+), 11 deletions(-) rename {tools => .devcontainer}/run_tool.sh (58%) diff --git a/tools/run_tool.sh b/.devcontainer/run_tool.sh similarity index 58% rename from tools/run_tool.sh rename to .devcontainer/run_tool.sh index e4fa335b7..ac9b9e21b 100755 --- a/tools/run_tool.sh +++ b/.devcontainer/run_tool.sh @@ -15,7 +15,12 @@ # Unified entry point for running a CLI tool by name. # Inside a container the tool is expected on PATH; outside, it is resolved via Bazel. -# See https://github.com/eclipse-score/devcontainer/tree/main/tools for further information. +# +# Do not modify this file. Its source of truth is: +# https://github.com/eclipse-score/devcontainer/blob/main/tools/run_tool.sh +# +# For usage and rationale, see: +# https://github.com/eclipse-score/devcontainer/blob/main/tools/README.md set -euo pipefail @@ -27,12 +32,18 @@ fi tool_name="$1" shift +script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" +repository_root="$(cd "${script_dir}/.." && pwd -P)" + if { [[ -f /.dockerenv ]] || [[ -f /run/.containerenv ]] || [[ -d /devcontainer ]]; } && - command -v "${tool_name}" >/dev/null 2>&1; then - exec "${tool_name}" "$@" -elif command -v bazel >/dev/null 2>&1; then - exec bazel run "@score_devcontainer//tools:${tool_name}" -- "$@" -else - echo "Could not run '${tool_name}': not available on PATH in a container, and bazel was not found." >&2 - exit 127 + command -v "${tool_name}" >/dev/null 2>&1; then + exec "${tool_name}" "$@" fi + +if command -v bazel >/dev/null 2>&1; then +cd "${repository_root}" +exec bazel run "//tools:${tool_name}" -- "$@" +fi + +echo "Could not run '${tool_name}': not available on PATH in a container, and bazel was not found." >&2 +exit 127 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 646c8e934..fbe8a29aa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,20 +46,20 @@ repos: - id: actionlint name: actionlint # Disable shellcheck and pyflakes for now, to enforce consistent behavior. - entry: tools/run_tool.sh actionlint -shellcheck= -pyflakes= + entry: .devcontainer/run_tool.sh actionlint -shellcheck= -pyflakes= language: system require_serial: true types: [yaml] files: ^\.github/workflows/ - id: ruff-check name: ruff-check - entry: tools/run_tool.sh ruff check --fix + entry: .devcontainer/run_tool.sh ruff check --fix language: system require_serial: true types: [python] - id: ruff-format name: ruff-format - entry: tools/run_tool.sh ruff format + entry: .devcontainer/run_tool.sh ruff format language: system require_serial: true types: [python] From bb4acd54b026288bd93a9538f688ea25d5edb519 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 12 Aug 2026 22:01:31 +0200 Subject: [PATCH 2/5] chore(devcontainer): align SCORE devcontainer versions --- .devcontainer/run_tool.sh | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.devcontainer/run_tool.sh b/.devcontainer/run_tool.sh index ac9b9e21b..3e5fdcd45 100755 --- a/.devcontainer/run_tool.sh +++ b/.devcontainer/run_tool.sh @@ -16,11 +16,8 @@ # Unified entry point for running a CLI tool by name. # Inside a container the tool is expected on PATH; outside, it is resolved via Bazel. # -# Do not modify this file. Its source of truth is: -# https://github.com/eclipse-score/devcontainer/blob/main/tools/run_tool.sh -# -# For usage and rationale, see: -# https://github.com/eclipse-score/devcontainer/blob/main/tools/README.md +# Do not modify this file. Its source of truth is managed by the +# SCORE devcontainer version-alignment policy. set -euo pipefail @@ -32,18 +29,12 @@ fi tool_name="$1" shift -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" -repository_root="$(cd "${script_dir}/.." && pwd -P)" - if { [[ -f /.dockerenv ]] || [[ -f /run/.containerenv ]] || [[ -d /devcontainer ]]; } && - command -v "${tool_name}" >/dev/null 2>&1; then - exec "${tool_name}" "$@" + command -v "${tool_name}" >/dev/null 2>&1; then + exec "${tool_name}" "$@" +elif command -v bazel >/dev/null 2>&1; then + exec bazel run "@score_devcontainer//tools:${tool_name}" -- "$@" +else + echo "Could not run '${tool_name}': not available on PATH in a container, and bazel was not found." >&2 + exit 127 fi - -if command -v bazel >/dev/null 2>&1; then -cd "${repository_root}" -exec bazel run "//tools:${tool_name}" -- "$@" -fi - -echo "Could not run '${tool_name}': not available on PATH in a container, and bazel was not found." >&2 -exit 127 From 027af3646e0ff7dc29504f4f15da63b2841bd5ae Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 12 Aug 2026 22:32:16 +0200 Subject: [PATCH 3/5] chore(devcontainer): align SCORE devcontainer versions --- .devcontainer/run_tool.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.devcontainer/run_tool.sh b/.devcontainer/run_tool.sh index 3e5fdcd45..e4fa335b7 100755 --- a/.devcontainer/run_tool.sh +++ b/.devcontainer/run_tool.sh @@ -15,9 +15,7 @@ # Unified entry point for running a CLI tool by name. # Inside a container the tool is expected on PATH; outside, it is resolved via Bazel. -# -# Do not modify this file. Its source of truth is managed by the -# SCORE devcontainer version-alignment policy. +# See https://github.com/eclipse-score/devcontainer/tree/main/tools for further information. set -euo pipefail From c7316b6075a61684352c48b33b88749175a8c1ef Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 12 Aug 2026 22:34:51 +0200 Subject: [PATCH 4/5] chore(devcontainer): align SCORE devcontainer versions --- .devcontainer/run_tool.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/run_tool.sh b/.devcontainer/run_tool.sh index e4fa335b7..c2f441086 100755 --- a/.devcontainer/run_tool.sh +++ b/.devcontainer/run_tool.sh @@ -16,6 +16,9 @@ # Unified entry point for running a CLI tool by name. # Inside a container the tool is expected on PATH; outside, it is resolved via Bazel. # See https://github.com/eclipse-score/devcontainer/tree/main/tools for further information. +# +# Do not modify this file. Its source of truth is managed by the +# SCORE devcontainer version-alignment policy. set -euo pipefail From 8b27e64723fbc5d02e248a3c653ac7ecdb282b57 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 12 Aug 2026 23:47:11 +0200 Subject: [PATCH 5/5] chore(devcontainer): standardize SCORE devcontainer integration --- .devcontainer/{run_tool.sh => run-tool} | 2 +- .pre-commit-config.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename .devcontainer/{run_tool.sh => run-tool} (96%) diff --git a/.devcontainer/run_tool.sh b/.devcontainer/run-tool similarity index 96% rename from .devcontainer/run_tool.sh rename to .devcontainer/run-tool index c2f441086..7821981d0 100755 --- a/.devcontainer/run_tool.sh +++ b/.devcontainer/run-tool @@ -18,7 +18,7 @@ # See https://github.com/eclipse-score/devcontainer/tree/main/tools for further information. # # Do not modify this file. Its source of truth is managed by the -# SCORE devcontainer version-alignment policy. +# SCORE devcontainer standardization policy. set -euo pipefail diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fbe8a29aa..2726c4e3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,20 +46,20 @@ repos: - id: actionlint name: actionlint # Disable shellcheck and pyflakes for now, to enforce consistent behavior. - entry: .devcontainer/run_tool.sh actionlint -shellcheck= -pyflakes= + entry: .devcontainer/run-tool actionlint -shellcheck= -pyflakes= language: system require_serial: true types: [yaml] files: ^\.github/workflows/ - id: ruff-check name: ruff-check - entry: .devcontainer/run_tool.sh ruff check --fix + entry: .devcontainer/run-tool ruff check --fix language: system require_serial: true types: [python] - id: ruff-format name: ruff-format - entry: .devcontainer/run_tool.sh ruff format + entry: .devcontainer/run-tool ruff format language: system require_serial: true types: [python]