changeset 6152:0d53a8d4170b stable 10.5.0

ci: add a manual job to build a .deb package
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 20 Feb 2022 14:14:39 +0300
parents 90067fe2df5d
children 7116d7256dba
files .gitlab-ci.yml
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.gitlab-ci.yml	Sun Feb 20 13:35:47 2022 +0300
+++ b/.gitlab-ci.yml	Sun Feb 20 14:14:39 2022 +0300
@@ -118,3 +118,28 @@
         RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt"
         TEST_HGMODULEPOLICY: "c"
     when: manual
+
+deb:
+    image: registry.heptapod.net/mercurial/ci-images/py3-hgext3rd
+    script:
+        - apt-get update && apt-get -yq install devscripts equivs --no-install-recommends
+        - mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
+        - version=$($PYTHON setup.py --version)
+        - debversion="$version+hg$(date +%Y%m%d)+$(hg log -r . -T '{node|short}')"
+        - make deb-prepare
+        - mkdir -p debs
+        - mv ../mercurial-evolve_$version.orig debs/mercurial-evolve_$debversion.orig
+        - cd debs/mercurial-evolve_$debversion.orig
+        - DEBEMAIL="evolve-testers@mercurial-scm.org" debchange --newversion "$debversion-1" "automated build"
+        - debuild --unsigned-source --unsigned-changes --build=binary
+        - dpkg --contents ../mercurial-evolve_$debversion-1_all.deb
+    variables:
+        DEBIAN_FRONTEND: noninteractive
+        DEB_BUILD_OPTIONS: nocheck nodoc
+    artifacts:
+        paths:
+            - debs/*.build
+            - debs/*.buildinfo
+            - debs/*.changes
+            - debs/*.deb
+    when: manual