From 7503e7f705fff5184b418478688924ccfb05f15c Mon Sep 17 00:00:00 2001 From: Philipp Hahn Date: Sat, 19 Aug 2023 09:49:38 +0200 Subject: [PATCH] ci: Compress with XZ until is fixed. Automatically register Distribution/Codename. --- .gitlab-ci.yml | 10 ++++++++-- debian/rules | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a640b55..4dad7dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,8 +66,14 @@ upload:gitlab: extends: .upload rules: - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_PROTECTED == "true" - script: - - dput --force gitlab univention-domain-join_*_amd64.changes + script: | + src=$(dpkg-parsechangelog -SSource) + ver=$(dpkg-parsechangelog -SVersion) + dist=$(dpkg-parsechangelog -SDistribution) + URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/debian_distributions?codename=${dist}" + curl --fail --head "$URL" || + curl --fail --request POST --user "PRIVATE-TOKEN:${CI_JOB_TOKEN}" "$URL" + dput --force gitlab "${src}_${ver}_amd64.changes" .launchpad: extends: .upload diff --git a/debian/rules b/debian/rules index 3f48fc5..a63669c 100755 --- a/debian/rules +++ b/debian/rules @@ -12,3 +12,6 @@ export http_proxy=http://127.0.0.1:9 # python-univention-domain-join binary package. %: dh $@ --with python3 --buildsystem=pybuild + +override_dh_builddeb: + dh_builddeb -- -Zxz