@@ -143,6 +143,7 @@ fn discover_crates(dir: &PathBuf, crates: &mut BTreeMap<CrateId, Crate>) -> Resu
143143 let id = parsed. package . name ;
144144
145145 let metadata = & parsed. package . metadata . embassy ;
146+ let metadata_docs = & parsed. package . metadata . embassy_docs ;
146147
147148 if metadata. skip {
148149 continue ;
@@ -155,6 +156,7 @@ fn discover_crates(dir: &PathBuf, crates: &mut BTreeMap<CrateId, Crate>) -> Resu
155156 }
156157 }
157158
159+ let docs = metadata_docs. clone ( ) ;
158160 let mut configs = metadata. build . clone ( ) ;
159161 if configs. is_empty ( ) {
160162 configs. push ( BuildConfig {
@@ -172,6 +174,7 @@ fn discover_crates(dir: &PathBuf, crates: &mut BTreeMap<CrateId, Crate>) -> Resu
172174 path,
173175 dependencies,
174176 configs,
177+ docs,
175178 publish : parsed. package . publish ,
176179 } ,
177180 ) ;
@@ -495,23 +498,18 @@ fn update_changelog(repo: &Path, c: &Crate) -> Result<()> {
495498
496499fn publish_release ( _repo : & Path , c : & Crate , push : bool ) -> Result < ( ) > {
497500 // Use the config with the must features!
498- let mut config = c. configs . first ( ) . unwrap ( ) ;
499- for c in c. configs . iter ( ) {
500- if c. features . len ( ) > config. features . len ( ) {
501- config = c;
502- }
503- }
504-
505501 let mut args: Vec < String > = vec ! [
506502 "publish" . to_string( ) ,
507503 "--manifest-path" . to_string( ) ,
508504 c. path. join( "Cargo.toml" ) . display( ) . to_string( ) ,
509505 ] ;
510506
511- args. push ( "--features" . into ( ) ) ;
512- args. push ( config. features . join ( "," ) ) ;
507+ if !c. docs . features . is_empty ( ) {
508+ args. push ( "--features" . into ( ) ) ;
509+ args. push ( c. docs . features . join ( "," ) ) ;
510+ }
513511
514- if let Some ( target) = & config . target {
512+ if let Some ( target) = & c . docs . target {
515513 args. push ( "--target" . into ( ) ) ;
516514 args. push ( target. clone ( ) ) ;
517515 }
0 commit comments