- apk add git
- git submodule init
- git submodule update --recursive --remote
+ - git fetch --tags
- name: yarn
image: node:14-alpine
- apk add git
- git submodule init
- git submodule update --recursive --remote
+ - git fetch --tags
when:
ref:
- refs/heads/main
\r
COPY lemmy-translations lemmy-translations\r
COPY src src\r
+COPY .git .git\r
+\r
+# Set UI version \r
+RUN echo "export const VERSION = '$(git describe --tag)';" > "src/shared/version.ts"\r
\r
RUN yarn\r
RUN yarn build:prod\r
import { i18n } from "../i18next";
import { repoUrl, joinLemmyUrl, docsUrl } from "../utils";
import { GetSiteResponse } from "lemmy-js-client";
+import { VERSION } from "../version";
interface FooterProps {
site: GetSiteResponse;
<div className="navbar-collapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
- <span class="navbar-text">{this.props.site.version}</span>
+ <span class="nav-link">UI: {VERSION}</span>
+ </li>
+ <li class="nav-item">
+ <span class="nav-link">BE: {this.props.site.version}</span>
</li>
<li className="nav-item">
<Link className="nav-link" to="/modlog">
get documentTitle(): string {
return `${
this.state.siteRes.site_view
- ? this.state.siteRes.site_view.site.name
+ ? this.state.siteRes.site_view.site.description
+ ? `${this.state.siteRes.site_view.site.name} - ${this.state.siteRes.site_view.site.description}`
+ : this.state.siteRes.site_view.site.name
: "Lemmy"
}`;
}
<div class="container">
{this.props.site_res.site_view && (
<Link
- title={this.props.site_res.version}
+ title={
+ this.props.site_res.site_view.site.description ||
+ this.props.site_res.site_view.site.name
+ }
className="d-flex align-items-center navbar-brand mr-md-3"
to="/"
>
--- /dev/null
+export const VERSION = "unknown version";