I’ve seen this command:
git pull --rebase --autostash && scripts/cmdeploy run
to do update the appversions.json but when i execute the command it says i’ve to choose a remote branch.. I guess i have to select the “main” isn’t it?
I’ve seen this command:
git pull --rebase --autostash && scripts/cmdeploy run
to do update the appversions.json but when i execute the command it says i’ve to choose a remote branch.. I guess i have to select the “main” isn’t it?
Here are the docs, and they specify the branch:
The git main branch has in-progress working fixes beyond the last stable tagged version; I might recommend keeping a working tree of git code on a stable branch, make your edits to appversion.json and then deploy (it’s outlined in the docs). Doing a git pull will bring down unrelated changes (which might be fine, or might not. it’s dev work.)
As a non-dev, one can do it like so (since you don’t care about your working tree, you’re not a dev and not committing code back) in an ongoing fashion:
# initial one-time checkout, or start over
git checkout https://github.com/chatmail/relay
cd relay
./scripts/initenv.sh
# get a tag
git checkout tags/1.12.0
./scripts/initenv.sh
./scripts/cmdeploy run
# new version
git checkout main
git pull
git checkout tags/1.13.0
./scripts/initenv.sh
./scripts/cmdeploy run
# appversion update
vim ./chatmaild/src/chatmaild/defaults/appversions.json
./scripts/cmdeploy run
If you move towards dev and contribute back, the workflow is different so not to worry there. This is a disposable (except chatmail.ini
) tree that can be recreated, but importantly a method which follows a tagged release of relay code for stability of upstream code.
Then seems wrong/incomplete to put it in this release description: Release Advertise new app versions to relay users · chatmail/relay · GitHub
As polite as I can, the release descriptions in that repo are… not how pretty much the rest of the world does it. Usually one sees the version (or sometimes ‘name version’ but just a version is more common); it’s unusual to see a text sentence of a feature as the heading; in this case, it’s announcing the capability (the new feature is it existing at all).
The gap in the design is keeping it updated as the clients release a lot faster than relay code; when I saw the git commit updating this file I also started to think about manually updating it like you and went “eh”. But my mind did start to nerd-wonder on how we might make it better.
My current thought: the relay endpoint serving appversions.json stays static, and the relay runs a systemd-timer query of the Github API for the latest version and updates appversions.json. A basic curl / sed / awk type tools can do the job but python is where I’d head first for this task with native JSON support, requests etc.
Thanks! Then I’ll keep following the future updates to se if something more formal/stable shows up
Note to self and chat, bad idea - this means someone with network ability at MSFT could watch all IPs pinging the API for the latest release. Using this path of thinking, having a relay “phone home” to anywhere (even delta.chat) is a bad idea.
Possible new idea: have the clients gossip to each other there’s an upgrade as part of the regular metadata in chats (MDNs or whatever), or have the relays gossip (!!) and spread the info that way. hmmm…
edit sorry this is neat to think about. The version information could be posted in DNS and endpoints query _version.delta.chat and get a TXT record with the info. The DC devs could probably automate the (D)DNS updates depending where they host. DNS is cached so we naturally “hide” endpoints behind lots of caching and protect endpoint IPs from any single data collection point. hmmm…