From e112fe1bf4fdaef1c9ab741590ac45b06dc01f76 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Tue, 21 Jan 2025 22:54:37 -0800 Subject: Add support for podman (#343) Helps to test #331. No reason that docker should work and podman shouldn't. ![image](https://github.com/user-attachments/assets/598c914d-09ca-4124-af43-49d52c230b43) --- CHANGELOG.md | 5 +++++ scripts/docker-run.bash | 10 +++++++--- test/formatters/build-image.bash | 10 +++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43a95cb..37b24c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,14 @@ The format is based on [Keep a Changelog]. * `gdformat` for [gdscript](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html) ([#342]). * `prettier-json-stringify` ([#183]). +### Internal +* You can run the formatter tests locally with podman instead of + docker now, if you want. Export `USE_PODMAN=1` ([#343]). + [#183]: https://github.com/radian-software/apheleia/pull/183 [#339]: https://github.com/radian-software/apheleia/pull/339 [#342]: https://github.com/radian-software/apheleia/pull/342 +[#343]: https://github.com/radian-software/apheleia/pull/343 ## 4.3 (released 2024-11-12) ### Features diff --git a/scripts/docker-run.bash b/scripts/docker-run.bash index e7de1f4..1a8f9a7 100755 --- a/scripts/docker-run.bash +++ b/scripts/docker-run.bash @@ -4,9 +4,13 @@ set -euo pipefail repo="$(git rev-parse --show-toplevel)" -docker=(docker) -if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then - docker=(sudo -E "${docker[@]}") +if [[ -z "${USE_PODMAN:-}" ]]; then + docker=(docker) + if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then + docker=(sudo -E "${docker[@]}") + fi +else + docker=(podman) fi it=() diff --git a/test/formatters/build-image.bash b/test/formatters/build-image.bash index 2753ba9..fe30174 100755 --- a/test/formatters/build-image.bash +++ b/test/formatters/build-image.bash @@ -14,9 +14,13 @@ fi cd "$(dirname "$0")" -docker=(docker) -if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then - docker=(sudo -E "${docker[@]}") +if [[ -z "${USE_PODMAN:-}" ]]; then + docker=(docker) + if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then + docker=(sudo -E "${docker[@]}") + fi +else + docker=(podman) fi args=() -- cgit v1.0