Open gedw99 opened 9 months ago
The release binaries can also use nats , avoiding GitHub rate limits .
Nats kv Store will do this.
GitHub wil fire a web hook and nats sever will pull down the binary and store it in the nats kv and then all clients will be told and get an upgrade message. The client then requests the binary from the nats kv.
make this optional because sone peopke might prefer to only sync off GitHub and not nats server.
It’s better to sync off nats Server for binaries because the data will also use nats Server so it’s aligned
That's perfect, but how can I do?
Ok so you seem to like the idea.
i can add it if you want ? It’s mostly makefike and a server.
so we would add a server folder to the repo with its own go mod.
i can also add a simple web site so that you as admin can see the sync state and devices enrolled etc.
Then just run Nats jetstream in embedded mode in to golang server.
then the client just imports the nats.go and that’s it.
The codes can live in the current json file. It’s good enough. Unless you were planning for codes to sync with the Tom chip on all devices ? Like how the OS stores passwords and passkeys. Could do that later too though or separate. I have golan code hat already does that for passkeys and passwords btw, with a golang gui web gui. We could also use that to secure the admin server actually. So it’s use Passcodes which is very secure. Probably imho the most secure and easiest to use. I use it on wi does also and it works now that Microsoft as their OS supporting it. Works with android and Chrome OS too.
Get the golang packaging code working in ci to produce the dmg.
should work but let’s see .. just a matter of calling the golang code that we do on laptops. In GitHub CI they are just Mac minis.
then release it as an artefact with tag.
add the ability to release from laptop too so we have parity with ci , so that it’s easily tests from your laptop.
then add updater to the golang code with update checking against GitHub. This does not check for the DMG but the app.
this means we need to release both the dmg and the app.
Polling or push ? Once we add sync basics it’s easily to make it push because NATS will listen to a GitHub web hook and then tell all clients that are online or offline that a new version is available. This will make it snappier without hitting GitHub and getting rate limited heuristics screwing thing up.
currently running app on desktop will need to fork and restart.
Add gui that displays the version also to golang code. Use semvar because code.json will break when its data structure evolves so we can then add migration code if needed to fix this automatically on a user upgrade to a major semvar.
Make the golang binary meta data as the source of truth for what version is installed. It matches the github tags.
do the same for windows when we get it working.