btrfs-progs/ci/ci-build-leap153
David Sterba 6ee9c9b477 btrfs-progs: ci: sync build options in Dockerfiles and runner scripts
The runner scripts ci/ci-build... pass build options that work for each
distro, however this was not matching some Dockerfiles. Pulling such
image would then fail due to missing dependencies (namely libudev).

Signed-off-by: David Sterba <dsterba@suse.com>
2024-01-26 06:02:24 +01:00

35 lines
917 B
Bash
Executable file

#!/bin/sh
# Usage: $0 [branch] [configure options]
# Create source tarball from HEAD or given branch and build it in openSUSE Leap 15.3 CI
# environment. Configure options follow branch name that can be empty.
HERE=`pwd`
if [ -f "configure.ac" ]; then
SOURCEDIR=`pwd`
elif [ -f "../configure.ac" ]; then
cd ..
SOURCEDIR=`pwd`
else
echo "ERROR: cannot determine source directory from `pwd`"
exit 1
fi
CIIMAGEDIR=ci/images/ci-openSUSE-Leap-15.3-x86_64
BRANCH=${1:-HEAD}
if [ "$#" -ge 1 ]; then
shift
fi
HASH=$(git log -1 --format='%h %s' "$BRANCH")
echo "CI: Generate archive from $BRANCH ($HASH)"
git archive --prefix=btrfs-progs-devel/ -o devel.tar "$BRANCH"
echo "$BRANCH $HASH" > GITCOMMIT
tar uvf devel.tar GITCOMMIT
#rm GITCOMMIT
gzip --force --best devel.tar
cd "$CIIMAGEDIR"
cp "$SOURCEDIR/devel.tar.gz" .
./docker-build
./docker-run -- ./test-build devel --disable-documentation --disable-zoned "$@"