Skip to content

Commit

Permalink
Fix versioning system
Browse files Browse the repository at this point in the history
  • Loading branch information
Cattn committed Sep 16, 2024
1 parent 5d32822 commit fbc201d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/internal/Updater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { toast } from "sonner";
import { RefreshCw } from "lucide-react";
import { Button } from "@/components/ui/button";
import * as semver from "semver";
import version from "@/lib/bunker";

import {
DropdownMenu,
Expand All @@ -18,12 +19,11 @@ const Updater: Plugin = {
description: "Bunker's internal updater. Provides automatic updates, as well as historical updates.",
icon: RefreshCw,
tile() {
const currentVersion = "v0.2.2";
const [latestVersion, setLatestVersion] = useState<string>();
const [installedVersion, setInstalledVersion] = useState<string>();

useEffect(() => {
setInstalledVersion("v0.2.2");
setInstalledVersion(version);
async function getLatestVersion() {
const response = await fetch(
"https://api.github.com/repos/bunkerweb/bunker/tags"
Expand Down Expand Up @@ -109,7 +109,7 @@ const Updater: Plugin = {
return (
<>
<p>Latest Bunker version: {latestVersion}</p>
<p>Installed Bunker version: {currentVersion}</p>
<p>Installed Bunker version: {version}</p>
</>
);
},
Expand All @@ -126,7 +126,7 @@ const Updater: Plugin = {
},[selectedVersion])

useEffect(() => {
setInstalledVersion("v0.2.2");
setInstalledVersion(version);
});

useState(() => {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/bunker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const version = "v0.2.3";
export default version;

0 comments on commit fbc201d

Please sign in to comment.