diff --git a/packaging/build_all.sh b/packaging/build_all.sh new file mode 100755 index 0000000..192cb6f --- /dev/null +++ b/packaging/build_all.sh @@ -0,0 +1,16 @@ +#!/bin/sh -eu + +# Resulting packages will be placed in the current working directory. +# Environment variables: +# GIT_BRANCH - which branch to build + +GIT_BRANCH=${GIT_BRANCH:='master'} + +DIRNAME=$(dirname $0) + +BASE='centos:7' ${DIRNAME}/rpm/build.sh +BASE='rockylinux:8' ${DIRNAME}/rpm/build.sh + +BASE='debian:stable' ${DIRNAME}/deb/build.sh +BASE='ubuntu:22.04' ${DIRNAME}/deb/build.sh +BASE='ubuntu:24.04' ${DIRNAME}/deb/build.sh diff --git a/packaging/deb/build.sh b/packaging/deb/build.sh index 9f67fe8..cd69afc 100755 --- a/packaging/deb/build.sh +++ b/packaging/deb/build.sh @@ -11,6 +11,7 @@ BASE=${BASE:='debian:stable'} docker buildx build -t glb-builder-${BASE} --build-arg base=${BASE} \ https://github.com/codership/glb.git\#${GIT_BRANCH}:packaging/deb/ -mkdir ${BASE} # output dir for packages +mkdir -p ${BASE} # output dir for packages +rm -rf ${BASE}/* docker run -v ${PWD}:/output --env GIT_BRANCH=${GIT_BRANCH} \ --env BASE=${BASE} glb-builder-${BASE} diff --git a/packaging/rpm/build.sh b/packaging/rpm/build.sh index 8237252..ee9530b 100755 --- a/packaging/rpm/build.sh +++ b/packaging/rpm/build.sh @@ -11,6 +11,7 @@ BASE=${BASE:='rockylinux:8'} docker buildx build -t glb-builder-${BASE} --build-arg base=${BASE} \ https://github.com/codership/glb.git\#${GIT_BRANCH}:packaging/rpm/ -mkdir ${BASE} # output dir for packages +mkdir -p ${BASE} # output dir for packages +rm -rf ${BASE}/* docker run -v ${PWD}:/output --env GIT_BRANCH=${GIT_BRANCH} \ --env BASE=${BASE} glb-builder-${BASE}