debian-package-job.sh (872B)
1 #!/bin/bash 2 set -exuo pipefail 3 # This file is in the public domain. 4 # Helper script to build the latest DEB packages in the container. 5 # Shared between various jobs. 6 7 unset LD_LIBRARY_PATH 8 9 # Install build-time dependencies. 10 # Update apt cache first 11 apt-get update 12 apt-get upgrade -y 13 mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control 14 15 VERSION="$(./contrib/ci/version.sh)" 16 export VERSION 17 : "${VERSION:?version generation returned an empty version}" 18 echo "Building package version ${VERSION}" 19 EMAIL=none gbp dch --dch-opt=-b --ignore-branch --debian-tag="%(version)s" --git-author --new-version="${VERSION}" 20 ./bootstrap 21 dpkg-buildpackage -rfakeroot -b -uc -us 22 23 ls -alh ../*.deb 24 mkdir -p /artifacts/donau/${CI_COMMIT_REF} # Variable comes from CI environment 25 mv ../*.deb /artifacts/donau/${CI_COMMIT_REF}/