Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Enter your OpenRouter API key in the Settings tab.

### Updates
- The app checks for updates on startup.
- Click the version button in the header (e.g. `v0.0.5`) to view update status, release notes, or manually re-check.
- Click the version button in the header (e.g. `v0.0.6`) to view update status, release notes, or manually re-check.
- Updates are pulled from GitHub Releases and expect a `Benchmaker-Portable.exe` asset on the latest tag.

## Development
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "benchmaker",
"version": "0.0.5",
"version": "0.0.6",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "benchmaker"
version = "0.0.5"
version = "0.0.6"
description = "Benchmaker"
authors = ["you"]
edition = "2021"
Expand Down
6 changes: 4 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "Benchmaker",
"version": "0.0.5"
"version": "0.0.6"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -39,7 +39,9 @@
"writeFile": true,
"createDir": true,
"scope": [
"$TEMP/**"
"$APPLOCALDATA",
"$APPLOCALDATA/**",
"$APPLOCALDATA/*"
]
}
},
Expand Down
17 changes: 9 additions & 8 deletions src/services/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,19 @@ export async function downloadUpdate(update: UpdateInfo): Promise<string> {
}

const binary = await downloadBinary(update.downloadUrl)
const { tempdir } = await import('@tauri-apps/api/os')
const { join } = await import('@tauri-apps/api/path')
const { createDir, writeBinaryFile } = await import('@tauri-apps/api/fs')
const { appLocalDataDir, join } = await import('@tauri-apps/api/path')
const { createDir, writeBinaryFile, BaseDirectory } = await import('@tauri-apps/api/fs')

const baseDir = await tempdir()
const updateDir = await join(baseDir, UPDATE_DIR_NAME)
await createDir(updateDir, { recursive: true })
const updateDir = UPDATE_DIR_NAME
await createDir(updateDir, { dir: BaseDirectory.AppLocalData, recursive: true })

const fileName = `Benchmaker-${update.version}.exe`
const updatePath = await join(updateDir, fileName)
const updatePath = await join(await appLocalDataDir(), updateDir, fileName)

await writeBinaryFile({ path: updatePath, contents: binary })
await writeBinaryFile(
{ path: `${updateDir}/${fileName}`, contents: binary },
{ dir: BaseDirectory.AppLocalData }
)
return updatePath
}

Expand Down