Skip to content

Commit

Permalink
#158 auto update with tauri
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Apr 13, 2022
1 parent 14786cb commit 71272f4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ By far most changes relate to `atomic-server`, so if not specified, assume the c
- Replaced `awc` with `ureq` #374
- Get rid of `.unwrap` calls in `commit_monitor` #345
- Make process management optional #324 #334
- Auto-update desktop distributions using Tauri #158

## [v0.31.1] - 2022-03-29

Expand Down
9 changes: 4 additions & 5 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ drill -b benchmark.yml --stats
- The main action required on this repo, is to _update the changelog_ and _tag releases_. The tags trigger the build and publish processes in the CI.
- We use [semver](https://semver.org/), and are still quite far from 1.0.0.
- The version for `atomic-lib` is the most important, and dictates the versions of `cli` and `server`. When `lib` changes minor version, `cli` and `server` should follow.
- After publishing, update the `./desktop/latest-version.json` file. This is used for auto-updating desktop distributions. See [tauri docs](https://tauri.studio/docs/distribution/updater).

## Including JS app_assets

Expand All @@ -137,11 +138,9 @@ If the CI scripts for some reason do not do their job (buildin releases, docker

### Building and publishing binaries

2. `cargo build --release`
3. `cargo build --release --features desktop` if you want the tray item (mac + win support)
4. Create a release on github, add the binaries.

I've got to automate this process some day...
1. `cargo build --release`
2. `cargo tauri build` (on every OS!)
3. Create a release on github, add the binaries and tauri builds

### Publishing to Cargo

Expand Down
19 changes: 19 additions & 0 deletions desktop/latest-version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "v0.31.1",
"notes": "Test version",
"pub_date": "2020-06-22T19:25:57Z",
"platforms": {
"darwin": {
"signature": "",
"url": "https://github.com/joepio/atomic-data-rust/releases/download/v0.31.1/Atomic.Server_0.31.1_aarch64.m1.macbook.dmg"
},
"linux": {
"signature": "",
"url": "https://github.com/joepio/atomic-data-rust/releases/download/v0.31.1/Atomic.Server_0.31.1_linux.m1.macbook.dmg"
},
"win64": {
"signature": "",
"url": "https://github.com/joepio/atomic-data-rust/releases/download/v0.31.1/Atomic.Server_0.31.1_win64.macbook.dmg"
}
}
}
6 changes: 5 additions & 1 deletion desktop/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
}
},
"updater": {
"active": false
"active": true,
"endpoints": [
"https://raw.githubusercontent.com/joepio/atomic-data-rust/master/desktop/latest-version.json"
],
"dialog": true
},
"allowlist": {
"all": true
Expand Down

0 comments on commit 71272f4

Please sign in to comment.