Skip to content

Commit 9e7f643

Browse files
committed
docker_appimage_tests.sh: simplify
add the version unconditionally in the script and do not add a placeholder to Dockerfile
1 parent aa3051d commit 9e7f643

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.github/scripts/Linux/docker_appimage_tests.sh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
mkdir aitest-context # empty build context
44
./UltraGrid-"$VERSION"-x86_64.AppImage --appimage-extract
55

6-
for n in archlinux ubuntu:22.04 ubuntu:latest; do
7-
dockerfile=.github/scripts/Linux/utils/Dockerfile.$n
8-
if expr $n : ".*:"; then
9-
image_name=$(echo $n | cut -d: -f 1)
10-
image_version=$(echo $n | cut -d: -f 2)
11-
n_dockerfile=$(mktemp)
12-
cat .github/scripts/Linux/utils/Dockerfile."$image_name" |
13-
sed "s/DOCKER_IMAGE_VERSION/$image_version/"\
14-
> "$n_dockerfile"
15-
dockerfile=$n_dockerfile
16-
fi
6+
for n in archlinux:latest ubuntu:22.04 ubuntu:latest; do
7+
image_name=$(echo $n | cut -d: -f 1)
8+
image_version=$(echo $n | cut -d: -f 2)
9+
dockerfile=$(mktemp)
10+
cat .github/scripts/Linux/utils/Dockerfile."$image_name" |
11+
sed "/FROM /s/:\$/$image_version/" > "$dockerfile"
1712
docker build -f "$dockerfile" -t aitest-$n aitest-context
1813
docker run --rm -v "$PWD"/squashfs-root/:/AppImage aitest-$n sh -ce '
1914
/AppImage/AppRun -v
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# inspired by https://github.com/aferrero2707/appimage-testsuite
22
# installing libraries included in https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist
3-
FROM ubuntu:DOCKER_IMAGE_VERSION
3+
FROM ubuntu
44
RUN apt-get update
55
RUN apt-get install -y libasound2 libegl1-mesa libfontconfig1 libgl1-mesa-glx \
66
libgmp10 libharfbuzz0b libopengl0 libp11-kit0 libx11-6 xvfb

0 commit comments

Comments
 (0)