mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-20 17:55:49 +00:00
contrib/scripts: add Fedora version to podmain container name for "nm-code-format-container.sh"
Older branches, like "nm-1-32" will always be formatted with a different, older clang-format version. Luckily we also have on "nm-1-32" branch the "nm-code-format-container.sh" script, so we can still reformat the sources using the container. However, as the name of the container was always "nm-code-format", we would have to re-generate the container when we switch between branches. As the container really only depends on the Fedora version (as the clang-format version is tied to the corresponding Fedora version), let's include the Fedora version in the name of the container.
This commit is contained in:
parent
edc37b3adf
commit
a6ff5ee448
|
@ -10,7 +10,9 @@ die() {
|
|||
DIR="$(realpath "$(dirname "$0")/../../")"
|
||||
cd "$DIR"
|
||||
|
||||
PODNAME=nm-code-format
|
||||
FEDORA_VERSION=35
|
||||
|
||||
PODNAME="nm-code-format-f$FEDORA_VERSION"
|
||||
|
||||
RENEW=0
|
||||
for a; do
|
||||
|
@ -37,7 +39,7 @@ if ! podman container exists "$PODNAME" ; then
|
|||
--name="$PODNAME" \
|
||||
-v "$DIR:/tmp/NetworkManager:Z" \
|
||||
-w /tmp/NetworkManager \
|
||||
fedora:35 \
|
||||
"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
|
||||
|
|
Loading…
Reference in a new issue