aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-09-30 19:28:12 -0500
committerGitHub <noreply@github.com>2026-09-30 19:28:12 -0500
commitff2b8efa65f42afb05e4227965f7920599d8bd97 (patch)
tree04648f03a45ee51772d4017646c0b835ed032f1c
parentd11b46884919add15d89e21512e581ecec8d2d89 (diff)
parent4623fd59125c7fa336784ca73c0de6605e52cb3b (diff)
downloadslskd-ff2b8efa65f42afb05e4227965f7920599d8bd97.tar.gz
Merge pull request #1863 from slskd/dockerfile
Fix failing Docker build
-rw-r--r--Dockerfile2
-rwxr-xr-xbin/build7
2 files changed, 7 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index daf0bef7..f4c392dc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,7 +10,7 @@ WORKDIR /slskd
COPY bin bin/.
COPY src/web src/web/.
-RUN sh ./bin/build --web-only
+RUN sh ./bin/build --web-only --version 0.0.1.65534-local
# build, test, and publish application binaries
# note: this needs to be pinned to an amd64 image in order to publish armv7 binaries
diff --git a/bin/build b/bin/build
index 8283bf25..9a15ca66 100755
--- a/bin/build
+++ b/bin/build
@@ -39,7 +39,12 @@ while test $# -gt 0; do
esac
done
-if [ -z "$version" ]; then
+if [ -z "$version" ]; then
+ if ! command -v git >/dev/null 2>&1; then
+ echo "💥 error: git is required to compose the version, but the executable couldn't be found"
+ exit 1
+ fi
+
tag=$(git describe --tags --abbrev=0)
sha=$(git rev-parse --short HEAD)
version=$tag+$sha