diff --git a/Dockerfile b/Dockerfile index c03cdc6d..a56a391b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,10 @@ COPY generate_translations.js \ COPY lemmy-translations lemmy-translations COPY src src +COPY .git .git + +# Set UI version +RUN echo "export const VERSION = '$(git describe --tag)';" > "src/shared/version.ts" RUN yarn RUN yarn build:prod diff --git a/src/shared/components/footer.tsx b/src/shared/components/footer.tsx index 16f5fc76..f688bb62 100644 --- a/src/shared/components/footer.tsx +++ b/src/shared/components/footer.tsx @@ -3,6 +3,7 @@ import { Link } from "inferno-router"; import { i18n } from "../i18next"; import { repoUrl, joinLemmyUrl, docsUrl } from "../utils"; import { GetSiteResponse } from "lemmy-js-client"; +import { VERSION } from "../version"; interface FooterProps { site: GetSiteResponse; @@ -19,7 +20,10 @@ export class Footer extends Component {