Skip to content

Commit 96ec97a

Browse files
committed
fix: workaround to publish example_test
GitoxideLabs/cargo-smart-release#36
1 parent 0683595 commit 96ec97a

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

RELEASING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,14 @@ When adding a new crate which is published, you need to:
119119
(substitute correct version).
120120
3. You must commit a new (empty) file `my_crate/CHANGELOG.md` to ensure the file will be tracked
121121
by git and pushed by `cargo-smart-release`
122-
4. If you want your package to be lockstep-versioned alongside hydro then make sure to add it
122+
4. (A) If you want your crate to be lockstep-versioned alongside hydro then make sure to add it
123123
to the [command in the `release.yml` workflow](https://github.com/hydro-project/hydro/blob/main/.github/workflows/release.yml#L82).
124124
(also update the `cargo smart-release` test command above in this file).
125+
5. (B) Otherwise, if your crate is only used via `[dev-dependencies]` then the crate may not
126+
initially publish due to https://github.com/Byron/cargo-smart-release/issues/36. To workaround
127+
this, additionally add the crate as a regular `[dependencies]` but marked as `optional = true`.
128+
When doing the dry run, look for `[INFO ] WOULD modify existing changelog for 'new_crate'.` to
129+
verify it will publish.
125130

126131
Then just run the release workflow as normal.
127132

dfir_rs/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ web-time = "1.0.0"
5959
# added to workaround `cargo smart-release` https://github.com/Byron/cargo-smart-release/issues/36
6060
multiplatform_test = { path = "../multiplatform_test", version = "^0.5.0", optional = true }
6161
include_mdtests = { path = "../include_mdtests", version = "^0.0.0", optional = true }
62+
example_test = { path = "../example_test", version = "^0.0.0", optional = true }
6263

6364
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
6465
tokio = { version = "1.29.0", features = [ "io-std" ] }

hydro_test/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ colored = "3.0.0"
1818
palette = "0.7.6"
1919
tokio = "1.29.0"
2020

21+
# added to workaround `cargo smart-release` https://github.com/Byron/cargo-smart-release/issues/36
22+
example_test = { path = "../example_test", version = "^0.0.0", optional = true }
23+
2124
[build-dependencies]
2225
stageleft_tool.workspace = true
2326

0 commit comments

Comments
 (0)