mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 18:40:05 +01:00
This is the version shipped in Fedora 37. As Fedora 37 is now out, the
core developers switch to it. Our gitlab-ci will also use that as base
image for the check-{patch.tree} tests and to generate the pages. There
is a need that everybody agrees on which clang-format version to use,
and that version should be the one of the currently used Fedora release.
Also update the used Fedora image in "contrib/scripts/nm-code-format-container.sh"
script.
The gitlab-ci still needs update in the following commit. The change
in isolation will break the "check-tree" test.
47 lines
834 B
Bash
Executable file
47 lines
834 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
die() {
|
|
echo "$@" >&2
|
|
exit 1
|
|
}
|
|
|
|
DIR="$(realpath "$(dirname "$0")/../../")"
|
|
cd "$DIR"
|
|
|
|
FEDORA_VERSION=37
|
|
|
|
PODNAME="nm-code-format-f$FEDORA_VERSION"
|
|
|
|
RENEW=0
|
|
for a; do
|
|
case "$a" in
|
|
-f)
|
|
RENEW=1
|
|
;;
|
|
*)
|
|
die "invalid argument \"$a\""
|
|
;;
|
|
esac
|
|
done
|
|
|
|
set -x
|
|
|
|
if [ "$RENEW" == 1 ]; then
|
|
if podman container exists "$PODNAME" ; then
|
|
podman rm "$PODNAME"
|
|
fi
|
|
fi
|
|
|
|
if ! podman container exists "$PODNAME" ; then
|
|
podman run \
|
|
--name="$PODNAME" \
|
|
-v "$DIR:/tmp/NetworkManager:Z" \
|
|
-w /tmp/NetworkManager \
|
|
"fedora:$FEDORA_VERSION" \
|
|
/bin/bash -c 'dnf upgrade -y && dnf install -y git /usr/bin/clang-format && ./contrib/scripts/nm-code-format.sh -i'
|
|
exit 0
|
|
fi
|
|
|
|
podman start -a "$PODNAME"
|