Skip to content

Commit

Permalink
Add support for podman (#343)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
raxod502 authored Jan 22, 2025
1 parent 049325e commit e112fe1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions scripts/docker-run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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=()
Expand Down
10 changes: 7 additions & 3 deletions test/formatters/build-image.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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=()
Expand Down

0 comments on commit e112fe1

Please sign in to comment.