Skip to content

Commit 8d7db95

Browse files
committed
Use variables for CMake Ubuntu versions
1 parent 10a6e38 commit 8d7db95

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ RUN \
6060
sudo apt update && \
6161
# The linuxdeploy cmake requires 3.2, but compatibility with CMake < 3.5 has been
6262
# removed from CMake as of 4.0.0
63-
sudo apt install -y cmake=3.31.6-0kitware1ubuntu22.04.1 cmake-data=3.31.6-0kitware1ubuntu22.04.1 && \
63+
UBUNTU_VERSION=$(grep '^VERSION_ID=' /etc/os-release | cut -d'"' -f2) && \
64+
VERSION="3.31.6-0kitware1ubuntu${UBUNTU_VERSION}.1" && \
65+
sudo apt-get update && \
66+
sudo apt-get install -y cmake=${VERSION} cmake-data=${VERSION} && \
6467
sudo apt-mark hold cmake cmake-data && \
6568
sudo rm -rf /var/lib/apt/lists
6669

0 commit comments

Comments
 (0)