From 7c0863867e683fd0012b720d0e0fdd9b13b5cd80 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Mon, 17 Apr 2023 11:26:09 +0100 Subject: [PATCH] fix(build): ensure a minimum go version in the build process. --- .gitlab-ci.yml | 3 ++- dists/build.sh | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01bea9c3..6400fcf7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,7 +74,8 @@ debian: - git config --global --add safe.directory $CI_PROJECT_DIR - VERSION="0.$(git rev-list --count HEAD)-1" - mkdir -p "$PKGDEST" - - sudo apt-get update -q && sudo apt-get install -y golang-go lsb-release config-package-dev rsync + - sudo apt-get update -q && sudo apt-get install -y lsb-release config-package-dev rsync + - sudo apt-get install -y -t bullseye-backports golang-go - dch --newversion=$VERSION --urgency=medium --distribution=stable --controlmaint "Release $VERSION" - dpkg-buildpackage -b -d --no-sign - mv ../*.deb $PKGDEST/ diff --git a/dists/build.sh b/dists/build.sh index 782d3f59..4a8f7ff2 100644 --- a/dists/build.sh +++ b/dists/build.sh @@ -80,7 +80,9 @@ build_in_docker_dpkg() { --env DEBIAN_FRONTEND=noninteractive --env DIST="$dist" \ "$BASEIMAGE/$dist" docker exec "$img" sudo apt-get update -q - docker exec "$img" sudo apt-get install -y golang-go lsb-release config-package-dev rsync + docker exec "$img" sudo apt-get install -y lsb-release config-package-dev rsync + [[ "$COMMAND" == debian ]] && aptopt=(-t bullseye-backports) + docker exec "$img" sudo apt-get install -y "${aptopt[@]}" golang-go fi docker exec --workdir="$BUILDIR/$PKGNAME" "$img" \