|
| 1 | +# Dev notes |
| 2 | + |
| 3 | +## Build and test |
| 4 | + |
| 5 | +``` |
| 6 | +cargo clean |
| 7 | +cargo build |
| 8 | +cargo test |
| 9 | +cd questdb-confstr-ffi/cpp_test |
| 10 | +./compile |
| 11 | +./run |
| 12 | +``` |
| 13 | + |
| 14 | +## Linting |
| 15 | + |
| 16 | +In addition, before pushing a PR, please run: |
| 17 | +``` |
| 18 | +cargo fmt --all |
| 19 | +cargo clippy --all-targets -- -D warnings |
| 20 | +``` |
| 21 | + |
| 22 | +## Cutting a release |
| 23 | + |
| 24 | +Let us assume we want to cut version `0.1.1` and the current version is `0.1.0`. |
| 25 | + |
| 26 | +### 1. New branch |
| 27 | +```shell |
| 28 | +git switch -c v0.1.1 |
| 29 | +``` |
| 30 | + |
| 31 | +### 2. Update the version in both `Cargo.toml` files |
| 32 | + |
| 33 | +```shell |
| 34 | +$EDITOR questdb-confstr/Cargo.toml |
| 35 | +$EDITOR questdb-confstr-ffi/Cargo.toml |
| 36 | +``` |
| 37 | + |
| 38 | +### 3. Re-run all tests and lints |
| 39 | + |
| 40 | +Don't forget about _clippy_: The newest version of Rust might have picked up |
| 41 | +some new lints that we need to fix. |
| 42 | + |
| 43 | +### 4. Commit the changes and create a PR |
| 44 | +```shell |
| 45 | +git add -u |
| 46 | +git commit -m "Bump version to 0.1.1" |
| 47 | +git push --set-upstream origin v0.1.1 |
| 48 | +``` |
| 49 | + |
| 50 | +N.B: _We don't need to update any `Cargo.lock` files for the ffi crate since |
| 51 | +there are no dependencies._ |
| 52 | + |
| 53 | +### 5. Create a new PR, get it reviewed and merge it |
| 54 | + |
| 55 | +https://github.com/questdb/questdb-confstr-rs/pull/new/ |
| 56 | + |
| 57 | +### 6. Publish both crates to crates.io |
| 58 | + |
| 59 | +```shell |
| 60 | +cargo login |
| 61 | + |
| 62 | +(cd questdb-confstr && cargo publish --dry-run) |
| 63 | +(cd questdb-confstr-ffi && cargo publish --dry-run) |
| 64 | + |
| 65 | +(cd questdb-confstr && cargo publish) |
| 66 | +(cd questdb-confstr && cargo publish) |
| 67 | +``` |
| 68 | + |
| 69 | +(If in doubt, see the |
| 70 | +"[Publishing on crates.io](https://doc.rust-lang.org/cargo/reference/publishing.html)" guide) |
| 71 | + |
| 72 | +### 7. Write the release notes |
| 73 | + |
| 74 | +* [Create a new release](https://github.com/questdb/questdb-confstr-rs/releases) on GitHub. |
| 75 | +* Specify what changed in the release notes. |
| 76 | +* Keep it readable (not autogenerated) and short. |
0 commit comments