refactor: add tag to web server update

This commit is contained in:
Mauricio Siu
2024-12-21 13:13:38 -06:00
parent 978324e2bf
commit ae159c5678
2 changed files with 6 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ export const UpdateServer = () => {
const { mutateAsync: getUpdateData, isLoading } =
api.settings.getUpdateData.useMutation();
const { data: dokployVersion } = api.settings.getDokployVersion.useQuery();
const { data: releaseTag } = api.settings.getReleaseTag.useQuery();
const [isOpen, setIsOpen] = useState(false);
const [latestVersion, setLatestVersion] = useState("");
@@ -74,7 +75,7 @@ export const UpdateServer = () => {
<div className="flex items-center gap-1.5 rounded-full px-3 py-1 mr-2 bg-muted">
<Server className="h-4 w-4 text-muted-foreground" />
<span className="text-sm text-muted-foreground">
{dokployVersion}
{dokployVersion} | {releaseTag}
</span>
</div>
)}

View File

@@ -26,6 +26,7 @@ import {
findAdminById,
findServerById,
getDokployImage,
getDokployImageTag,
getUpdateData,
initializeTraefik,
logRotationManager,
@@ -373,6 +374,9 @@ export const settingsRouter = createTRPCRouter({
getDokployVersion: adminProcedure.query(() => {
return packageInfo.version;
}),
getReleaseTag: adminProcedure.query(() => {
return getDokployImageTag();
}),
readDirectories: protectedProcedure
.input(apiServerSchema)
.query(async ({ ctx, input }) => {