summaryrefslogtreecommitdiffstats
path: root/debian/extra
diff options
context:
space:
mode:
Diffstat (limited to 'debian/extra')
-rwxr-xr-xdebian/extra/checkout-upstream10
1 files changed, 8 insertions, 2 deletions
diff --git a/debian/extra/checkout-upstream b/debian/extra/checkout-upstream
index 025b1df..7981d7b 100755
--- a/debian/extra/checkout-upstream
+++ b/debian/extra/checkout-upstream
@@ -49,7 +49,12 @@ mkdir -p debian/tmp
$CO
git config user.email "$DUMMY_USER_EMAIL"
git config user.name "$DUMMY_USER_NAME"
- if [ -n "${UPSTREAM_PULL_REQUEST:-}" ] && [ "${UPSTREAM_REPO}" != "https://github.com/systemd/systemd-stable.git" ]; then
+ if [ -f meson.version ]; then
+ UPSTREAM_VER=$(cat meson.version)
+ else
+ UPSTREAM_VER=$(git describe | sed 's/^v//;s/-/./g')
+ fi
+ if [ -n "${UPSTREAM_PULL_REQUEST:-}" ] && [ "${UPSTREAM_REPO}" != "https://github.com/systemd/systemd-stable.git" ] && ! echo "$UPSTREAM_VER" | grep -q '\.'; then
git rebase main || git rebase --abort
fi
)
@@ -63,7 +68,8 @@ fi
# build dependencies it is already too late, but this is mostly relevant for the dh_install files and
# the tests.
if [ -d .git ] && echo "$UPSTREAM_VER" | grep -q '\.'; then
- git checkout "ci/v${UPSTREAM_VER%%.*}-stable"
+ rm -rf .pc
+ git reset --hard "origin/ci/v${UPSTREAM_VER%%.*}-stable"
fi
if [ -n "${KEEP_DEBIAN_PATCHES:-}" ]; then