diff options
Diffstat (limited to 'contrib/ci/common/debian/deb-package')
-rw-r--r-- | contrib/ci/common/debian/deb-package/install-fix.patch | 13 | ||||
-rwxr-xr-x | contrib/ci/common/debian/deb-package/job.sh | 23 | ||||
-rwxr-xr-x | contrib/ci/common/debian/deb-package/version.sh | 17 |
3 files changed, 53 insertions, 0 deletions
diff --git a/contrib/ci/common/debian/deb-package/install-fix.patch b/contrib/ci/common/debian/deb-package/install-fix.patch new file mode 100644 index 000000000..8334c5a7a --- /dev/null +++ b/contrib/ci/common/debian/deb-package/install-fix.patch @@ -0,0 +1,13 @@ +diff --git a/debian/taler-exchange.install b/debian/taler-exchange.install +index 631c270b..072c6231 100644 +--- a/debian/taler-exchange.install ++++ b/debian/taler-exchange.install +@@ -36,6 +36,6 @@ usr/share/taler/exchange/templates/*.must + debian/etc-taler-exchange/* etc/ + + # Terms of service / privacy policy templates +-usr/share/taler/exchange/*.rst ++#usr/share/taler/exchange/terms/*.rst + # Translations of ToS/PP +-usr/share/taler/exchange/locale/*/LC_MESSAGES/*.po ++#usr/share/taler/exchange/terms/locale/*/LC_MESSAGES/*.po diff --git a/contrib/ci/common/debian/deb-package/job.sh b/contrib/ci/common/debian/deb-package/job.sh new file mode 100755 index 000000000..922f8bf63 --- /dev/null +++ b/contrib/ci/common/debian/deb-package/job.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -exuo pipefail +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + + +unset LD_LIBRARY_PATH + +# Install build-time dependencies. +# Update apt cache first +apt-get update +apt-get upgrade -y +mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control + +export VERSION="$(./contrib/ci/jobs/4-deb-package/version.sh)" +echo "Building package version ${VERSION}" +EMAIL=none gbp dch --dch-opt=-b --ignore-branch --debian-tag="%(version)s" --git-author --new-version="${VERSION}" +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us + +ls -alh ../*.deb +mkdir -p /artifacts/exchange/${CI_COMMIT_REF} # Variable comes from CI environment +mv ../*.deb /artifacts/exchange/${CI_COMMIT_REF}/ diff --git a/contrib/ci/common/debian/deb-package/version.sh b/contrib/ci/common/debian/deb-package/version.sh new file mode 100755 index 000000000..52031b23a --- /dev/null +++ b/contrib/ci/common/debian/deb-package/version.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -ex + +BRANCH=$(git name-rev --name-only HEAD) +if [ -z "${BRANCH}" ]; then + exit 1 +else + # "Unshallow" our checkout, but only our current branch, and exclude the submodules. + git fetch --no-recurse-submodules --tags --depth=1000 origin "${BRANCH}" + RECENT_VERSION_TAG=$(git describe --tags --match 'v*.*.*' --exclude '*-dev*' --always --abbrev=0 HEAD || exit 1) + commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)" + if [ "${commits}" = "0" ]; then + git describe --tag HEAD | sed -r 's/^v//' || exit 1 + else + echo $(echo ${RECENT_VERSION_TAG} | sed -r 's/^v//')-${commits}-$(git rev-parse --short=8 HEAD) + fi +fi |