Skip to content

Commit 9542034

Browse files
committed
build: allow to test RPM / Deb packages locally
Provided the script to build a RPM / Deb package, install it inside a docker container based on an appropriate image and verify that the main class of the extension (Tarantool) is available from the PHP interpreter. The script builds a package just like it is performed in CI: using packpack. It should be available in PATH directories. Only RPM packages are here now, but the following commits will enable Deb packages too. Part of #117
1 parent ebeae6a commit 9542034

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

test.pkg.all.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
set -exu # Strict shell (w/o -o pipefail)
4+
5+
distros="
6+
el:8
7+
fedora:25
8+
fedora:26
9+
fedora:27
10+
fedora:28
11+
fedora:29
12+
fedora:30
13+
fedora:31
14+
"
15+
16+
if ! type packpack; then
17+
echo "Unable to find packpack"
18+
exit 1
19+
fi
20+
21+
for distro in $distros; do
22+
export OS="${distro%%:*}"
23+
export DIST="${distro#*:}"
24+
if [ "${OS}" = "el" ]; then
25+
export OS=centos
26+
fi
27+
28+
rm -rf build
29+
packpack
30+
31+
docker run \
32+
--volume "$(realpath .):/tarantool-php" \
33+
--workdir /tarantool-php \
34+
--rm \
35+
"${OS}:${DIST}" \
36+
./test.pkg.sh
37+
done

0 commit comments

Comments
 (0)