Skip to content

Commit 605f21e

Browse files
committed
developer notes
1 parent f0ad704 commit 605f21e

File tree

2 files changed

+79
-72
lines changed

2 files changed

+79
-72
lines changed

DEV_NOTES.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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.

README.md

+3-72
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,7 @@
11
# QuestDB configuration string parser
22

3-
This is for:
4-
* The [questdb-confstr](./questdb-confstr) crate
3+
Consists of:
4+
* The [questdb-confstr](./questdb-confstr) crate (documents grammar)
55
* and its bindings for C [questdb-confstr-ffi](./questdb-confstr-ffi)
66

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

0 commit comments

Comments
 (0)