diff options
| -rw-r--r-- | Dockerfile | 2 | ||||
| -rwxr-xr-x | bin/build | 7 |
2 files changed, 7 insertions, 2 deletions
@@ -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 @@ -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 |
