From e64df20e74e0bef9e29a1d4575963b1a3b59e8ba Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Thu, 11 Feb 2021 12:55:23 +0300 Subject: [PATCH] Pull request #991: scripts: fix docker version handling Merge in DNS/adguard-home from 2663-docker-version to master Closes #2663. Squashed commit of the following: commit f9b03fd12543a3975ea6dc45115e4ec0f73eba1e Author: Ainar Garipov Date: Thu Feb 11 12:40:06 2021 +0300 all: document changes commit 8bce414c9f25210420b6026cb4c21908c8b9c74f Author: Ainar Garipov Date: Thu Feb 11 12:22:45 2021 +0300 scripts: fix docker version handling --- CHANGELOG.md | 6 ++++++ scripts/make/build-docker.sh | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f68a9dc9..f16494d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ and this project adheres to ## [v0.105.1] - 2021-02-24 --> +### Fixed + +- Incorrect version tag in the Docker release ([#2663]). + +[#2663]: https://github.com/AdguardTeam/AdGuardHome/issues/2663 + ## [v0.105.0] - 2021-02-10 ### Added diff --git a/scripts/make/build-docker.sh b/scripts/make/build-docker.sh index d8eb2737..29b86ba6 100644 --- a/scripts/make/build-docker.sh +++ b/scripts/make/build-docker.sh @@ -17,7 +17,16 @@ set -e -f -u readonly channel="$CHANNEL" readonly commit="$COMMIT" readonly dist_dir="$DIST_DIR" -readonly version="$VERSION" + +if [ "${VERSION:-}" = 'v0.0.0' -o "${VERSION:-}" = '' ] +then + readonly version="$(sh ./scripts/make/version.sh)" +else + readonly version="$VERSION" +fi + +echo $version +exit 0 # Allow users to use sudo. readonly sudo_cmd="${SUDO:-}"