File tree 3 files changed +7
-2
lines changed
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ pub async fn run(_opts: Options) -> anyhow::Result<()> {
53
53
Manifest {
54
54
manifest_version : manifest:: MANIFEST_VERSION ,
55
55
component : Component {
56
- name : component_name,
56
+ name : component_name. clone ( ) ,
57
+ slug : Some ( slug:: slugify ( & component_name) ) ,
57
58
version : "0.1.0" . to_string ( ) ,
58
59
wit_world_version : "0.4.0" . to_string ( ) ,
59
60
category : * component_category. value ,
Original file line number Diff line number Diff line change @@ -83,7 +83,10 @@ pub async fn run(opts: Options) -> anyhow::Result<()> {
83
83
. into_inner ( ) ,
84
84
} ;
85
85
86
- let component_slug = slug:: slugify ( & manifest. component . name ) ;
86
+ let component_slug = match manifest. component . slug {
87
+ Some ( ref slug) => slug. clone ( ) ,
88
+ None => slug:: slugify ( & manifest. component . name ) ,
89
+ } ;
87
90
88
91
let ( do_update, component) = match client
89
92
. get_component_by_slug ( )
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ pub struct Manifest {
22
22
#[ serde( rename_all = "kebab-case" ) ]
23
23
pub struct Component {
24
24
pub name : String ,
25
+ pub slug : Option < String > ,
25
26
pub version : String ,
26
27
#[ serde( with = "Category" ) ]
27
28
pub category : api_types:: ComponentCreateInputCategory ,
You can’t perform that action at this time.
0 commit comments