File: ci-build-centos8

package info (click to toggle)
btrfs-progs 6.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 20,596 kB
  • sloc: ansic: 127,198; sh: 7,836; python: 1,385; makefile: 900; asm: 296
file content (34 lines) | stat: -rwxr-xr-x 915 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Usage: $0 [branch] [configure options]
# Create source tarball from HEAD or given branch and build it in Centos 8 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-centos-8-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-libudev --disable-zoned "$@"