Skip to content

Commit 2637d8f

Browse files
authored
build: rename generate_docs feature to use_ros_shim. Only publish use_ros_shim feature to crates.io to avoid requiring ROS (#14)
Signed-off-by: Esteve Fernandez <[email protected]>
1 parent 7818b4d commit 2637d8f

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

release-plz.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[workspace]
2+
3+
[[package]]
4+
name = "rosidl_runtime_rs"
5+
publish_features = ["use_ros_shim"]
6+
publish_all_features = false

rosidl_runtime_rs/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ serde = { version = "1", optional = true }
2121
default = []
2222
# This feature is solely for the purpose of being able to generate documetation without a ROS installation
2323
# The only intended usage of this feature is for docs.rs builders to work, and is not intended to be used by end users
24-
generate_docs = []
24+
use_ros_shim = []
2525

2626
[dev-dependencies]
2727
# Needed for writing property tests
@@ -34,4 +34,4 @@ serde_json = "1"
3434
cfg-if = "1.0.0"
3535

3636
[package.metadata.docs.rs]
37-
features = ["generate_docs"]
37+
features = ["use_ros_shim"]

rosidl_runtime_rs/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cfg_if::cfg_if! {
2-
if #[cfg(not(feature="generate_docs"))] {
2+
if #[cfg(not(feature="use_ros_shim"))] {
33
use std::env;
44
use std::path::Path;
55

@@ -19,7 +19,7 @@ cfg_if::cfg_if! {
1919
}
2020

2121
fn main() {
22-
#[cfg(not(feature = "generate_docs"))]
22+
#[cfg(not(feature = "use_ros_shim"))]
2323
{
2424
let ament_prefix_path_list = get_env_var_or_abort(AMENT_PREFIX_PATH);
2525
for ament_prefix_path in ament_prefix_path_list.split(':') {

0 commit comments

Comments
 (0)