1
0
mirror of https://github.com/systemd/systemd.git synced 2025-04-01 18:50:16 +03:00

mkosi: Don't touch the packaging checkout if work is being done

If work is being done in a separate branch, don't touch the packaging
checkout.
This commit is contained in:
Daan De Meyer 2024-07-02 22:27:01 +02:00 committed by Luca Boccassi
parent 48d6dad100
commit 88e9230643

View File

@ -9,8 +9,15 @@ fi
PKG_SUBDIR="$(realpath --canonicalize-missing "pkg/$DISTRIBUTION" --relative-to "$PWD")"
if [[ -d "$PKG_SUBDIR/.git" ]] && [[ "$(git -C "$PKG_SUBDIR" rev-parse HEAD)" == "$GIT_COMMIT" ]]; then
exit 0
if [[ -d "$PKG_SUBDIR/.git" ]]; then
if [[ "$(git -C "$PKG_SUBDIR" rev-parse HEAD)" == "$GIT_COMMIT" ]]; then
exit 0
fi
# If work is being done on the packaging rules in a separate branch, don't touch the checkout.
if ! git merge-base --is-ancestor HEAD "origin/$GIT_BRANCH"; then
exit 0
fi
fi
if [[ ! -e "$PKG_SUBDIR" ]] || [[ -z "$(ls --almost-all "$PKG_SUBDIR")" ]]; then