diff --git a/BUILDING.md b/BUILDING.md index ebd1ea464..98af21e49 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -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 diff --git a/RELEASE.md b/RELEASE.md index 439aee16f..324105149 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -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`: diff --git a/scripts/update-rpc-bindings.sh b/scripts/update-rpc-bindings.sh new file mode 100755 index 000000000..8e2f270e3 --- /dev/null +++ b/scripts/update-rpc-bindings.sh @@ -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/ \ No newline at end of file