mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 20:20:09 +01:00
contrib: autodetect the Fedora version for "nm-code-format-container.sh" script
From time to time we bump the used clang-format (and Fedora) version. Previously, we had to change more than one places. Instead, let the "nm-code-format-container.sh" parse it from ".gitlab-ci/config.yml".
This commit is contained in:
parent
a705975a9e
commit
f08102bf41
1 changed files with 5 additions and 1 deletions
|
|
@ -10,7 +10,11 @@ die() {
|
|||
DIR="$(realpath "$(dirname "$0")/../../")"
|
||||
cd "$DIR"
|
||||
|
||||
FEDORA_VERSION=38
|
||||
# The correct clang-format version is the one from the Fedora version used in our
|
||||
# gitlab-ci pipeline. Parse it from ".gitlab-ci/config.yml".
|
||||
FEDORA_VERSION="$(sed '/^ tier: 1/,/^ - name/!d' .gitlab-ci/config.yml | sed -n "s/^ - '\([0-9]\+\)'$/\1/p" | sed -n 1p)"
|
||||
|
||||
test -n "$FEDORA_VERSION" || die "Could not detect the Fedora version in .gitlab-ci/config.yml"
|
||||
|
||||
PODNAME="nm-code-format-f$FEDORA_VERSION"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue