]> Untitled Git - lemmy.git/commitdiff
Trying to fix version again. (#3246)
authorDessalines <dessalines@users.noreply.github.com>
Wed, 21 Jun 2023 19:46:32 +0000 (15:46 -0400)
committerGitHub <noreply@github.com>
Wed, 21 Jun 2023 19:46:32 +0000 (21:46 +0200)
docker/Dockerfile

index f28c3ac9690751c2a984d0b6003ebf55cd6aca8f..4293790311fbbbc08d815b83f52df4a35e6af4f2 100644 (file)
@@ -20,7 +20,8 @@ RUN --mount=type=cache,target=/app/target \
 # Release mode build
 RUN \
     if [ "$RUST_RELEASE_MODE" = "release" ] ; then \
-      cargo build --target ${CARGO_BUILD_TARGET} --release \
+      echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs" \
+      && cargo build --target ${CARGO_BUILD_TARGET} --release \
       && cp ./target/$CARGO_BUILD_TARGET/$RUST_RELEASE_MODE/lemmy_server /app/lemmy_server; \
     fi