Skip to content

Commit

Permalink
add script to check version
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jul 16, 2024
1 parent 0e8c006 commit 226b226
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions desktop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ RUN apt update && apt install -y gnupg wget software-properties-common && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip qgis python3-qgis python3-qgis-common python3-venv \
python3-pytest python3-mock xvfb qttools5-dev-tools && \
apt-get clean

# Test version
COPY scripts/check_version.sh /opt/check_version.sh
RUN check_version.sh ${release}
14 changes: 14 additions & 0 deletions scripts/check_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

VERSION_CHECK=$1
VERSION_INSTALLED=$(apt-cache show qgis | grep Version | cut -d' ' -f2 | cut -d. -f1,2 )

if [[ ${VERSION_CHECK} == ${VERSION_INSTALLED} ]]; then
echo "version check ok: ${VERSION_INSTALLED}"
exit 0
fi

echo "version mismatch!"
echo "installed: ${VERSION_INSTALLED}"
echo "check: ${VERSION_CHECK}"
exit 1

0 comments on commit 226b226

Please sign in to comment.