improve building and releasing docs

This commit is contained in:
adbenitez 2025-11-22 22:43:21 +01:00
parent 718bf0d74b
commit ec49ac8eb6
3 changed files with 25 additions and 15 deletions

View file

@ -22,22 +22,12 @@ subproject _deltachat-core-rust_:
## Generate JSON-RPC bindings
To generate the JSON-RPC bindings (ex. `chat.delta.rpc.*` package)
install the [dcrpcgen tool](https://github.com/chatmail/dcrpcgen)
then generate the `schema.json` file:
To generate/update the JSON-RPC bindings (ex. `chat.delta.rpc.*` package)
install Rust tooling (read sections below) and the [dcrpcgen tool](https://github.com/chatmail/dcrpcgen)
then generate the code running the script:
```
# in the root of the project:
cd ./jni/deltachat-core-rust/deltachat-rpc-server
cargo run -- --openrpc > ../../../schema.json
cd ../../../
```
then pass the schema file to the `dcrpcgen` tool to generate the
code:
```
dcrpcgen java --schema schema.json -o ./src/main/java/
./scripts/generate-rpc-bindings.sh
```
## Build Using Nix

View file

@ -3,6 +3,8 @@
## Generate APKs
### Update core and translations
on the command-line, in a PR called "update-core-and-stuff-DATE":
1. update core:
@ -21,12 +23,19 @@ a) Update `CHANGELOG.md`
as `update to core 1.2.3` or `using core 1.2.3`
2. update translations and local help:
2. update JSON-RPC bindings:
```
./scripts/update-rpc-bindings.sh
```
3. update translations and local help:
```
./scripts/tx-pull-translations.sh
./scripts/create-local-help.sh # requires deltachat-pages checked out at ../deltachat-pages
```
### Prepare release
the following steps are done in a PR called `prep-VERSION` (no leading "v"):
3. Update `CHANGELOG.md`:

11
scripts/update-rpc-bindings.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
# you need to have dcrpcgen
# generate schema.json
ROOT_DIR=$PWD
cd ./jni/deltachat-core-rust/deltachat-rpc-server
cargo run -- --openrpc > "$ROOT_DIR/schema.json"
cd "$ROOT_DIR"
# generate code
dcrpcgen java --schema schema.json -o ./src/main/java/