Skip to content

Commit e112fe1

Browse files
authored
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)
1 parent 049325e commit e112fe1

3 files changed

Lines changed: 19 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ The format is based on [Keep a Changelog].
1111
* `gdformat` for [gdscript](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html) ([#342]).
1212
* `prettier-json-stringify` ([#183]).
1313

14+
### Internal
15+
* You can run the formatter tests locally with podman instead of
16+
docker now, if you want. Export `USE_PODMAN=1` ([#343]).
17+
1418
[#183]: https://github.com/radian-software/apheleia/pull/183
1519
[#339]: https://github.com/radian-software/apheleia/pull/339
1620
[#342]: https://github.com/radian-software/apheleia/pull/342
21+
[#343]: https://github.com/radian-software/apheleia/pull/343
1722

1823
## 4.3 (released 2024-11-12)
1924
### Features

scripts/docker-run.bash

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ set -euo pipefail
44

55
repo="$(git rev-parse --show-toplevel)"
66

7-
docker=(docker)
8-
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
9-
docker=(sudo -E "${docker[@]}")
7+
if [[ -z "${USE_PODMAN:-}" ]]; then
8+
docker=(docker)
9+
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
10+
docker=(sudo -E "${docker[@]}")
11+
fi
12+
else
13+
docker=(podman)
1014
fi
1115

1216
it=()

test/formatters/build-image.bash

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ fi
1414

1515
cd "$(dirname "$0")"
1616

17-
docker=(docker)
18-
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
19-
docker=(sudo -E "${docker[@]}")
17+
if [[ -z "${USE_PODMAN:-}" ]]; then
18+
docker=(docker)
19+
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
20+
docker=(sudo -E "${docker[@]}")
21+
fi
22+
else
23+
docker=(podman)
2024
fi
2125

2226
args=()

0 commit comments

Comments
 (0)