@@ -142,9 +142,6 @@ pub struct BuildSpecCommand {
142142 /// the necessary directories will be created
143143 #[ arg( short, long = "output" ) ]
144144 pub ( crate ) output_file : Option < PathBuf > ,
145- /// [DEPRECATED] and will be removed in v0.7.0, use `profile`.
146- #[ arg( short = 'R' , long, conflicts_with = "profile" ) ]
147- pub ( crate ) release : bool ,
148145 /// Build profile for the binary to generate the chain specification.
149146 #[ arg( long, value_enum) ]
150147 pub ( crate ) profile : Option < Profile > ,
@@ -220,7 +217,6 @@ impl BuildSpecCommand {
220217 let BuildSpecCommand {
221218 output_file,
222219 profile,
223- release,
224220 id,
225221 default_bootnode,
226222 chain_type,
@@ -362,11 +358,11 @@ impl BuildSpecCommand {
362358 } ;
363359
364360 // Prompt user for build profile.
365- let mut profile = match profile {
361+ let profile = match profile {
366362 Some ( profile) => profile,
367363 None => {
368364 let default = Profile :: Release ;
369- if prompt && !release {
365+ if prompt {
370366 guide_user_to_select_profile ( cli) ?
371367 } else {
372368 default
@@ -470,11 +466,6 @@ impl BuildSpecCommand {
470466 DEFAULT_PACKAGE . to_string ( )
471467 } ;
472468
473- if release {
474- cli. warning ( "NOTE: release flag is deprecated. Use `--profile` instead." ) ?;
475- profile = Profile :: Release ;
476- }
477-
478469 Ok ( BuildSpec {
479470 output_file,
480471 profile,
@@ -774,7 +765,6 @@ mod tests {
774765 let para_id = 4242 ;
775766 let protocol_id = "pop" ;
776767 let relay = Polkadot ;
777- let release = false ;
778768 let profile = Profile :: Production ;
779769 let deterministic = true ;
780770 let package = "runtime-name" ;
@@ -787,7 +777,6 @@ mod tests {
787777 BuildSpecCommand {
788778 output_file : Some ( PathBuf :: from ( output_file) ) ,
789779 profile : Some ( profile. clone ( ) ) ,
790- release,
791780 id : Some ( para_id) ,
792781 default_bootnode,
793782 chain_type : Some ( chain_type. clone ( ) ) ,
@@ -870,7 +859,6 @@ mod tests {
870859 let para_id = 4242 ;
871860 let protocol_id = "pop" ;
872861 let relay = Polkadot ;
873- let release = false ;
874862 let profile = Profile :: Production ;
875863 let deterministic = true ;
876864 let package = "runtime-name" ;
@@ -893,7 +881,6 @@ mod tests {
893881 BuildSpecCommand {
894882 output_file : Some ( PathBuf :: from ( output_file) ) ,
895883 profile : Some ( profile. clone ( ) ) ,
896- release,
897884 id : Some ( para_id) ,
898885 default_bootnode,
899886 chain_type : Some ( chain_type. clone ( ) ) ,
@@ -1028,30 +1015,6 @@ mod tests {
10281015 Ok ( ( ) )
10291016 }
10301017
1031- #[ tokio:: test]
1032- async fn configure_build_spec_release_deprecated_works ( ) -> anyhow:: Result < ( ) > {
1033- // Create a temporary file to act as the existing chain spec file.
1034- let temp_dir = tempdir ( ) ?;
1035- let chain_spec_path = temp_dir. path ( ) . join ( "existing-chain-spec.json" ) ;
1036- std:: fs:: write ( & chain_spec_path, "{}" ) ?;
1037- // Use the deprcrated release flag.
1038- let release = true ;
1039- let build_spec_cmd = BuildSpecCommand {
1040- release,
1041- chain : Some ( chain_spec_path. to_string_lossy ( ) . to_string ( ) ) ,
1042- ..Default :: default ( )
1043- } ;
1044- let mut cli =
1045- MockCli :: new ( ) . expect_confirm (
1046- "An existing chain spec file is provided. Do you want to make additional changes to it?" ,
1047- false ,
1048- ) . expect_warning ( "NOTE: release flag is deprecated. Use `--profile` instead." ) ;
1049- let build_spec = build_spec_cmd. configure_build_spec ( & mut cli) . await ?;
1050- assert_eq ! ( build_spec. profile, release. into( ) ) ;
1051- cli. verify ( ) ?;
1052- Ok ( ( ) )
1053- }
1054-
10551018 #[ test]
10561019 fn update_code_works ( ) -> anyhow:: Result < ( ) > {
10571020 let temp_dir = tempdir ( ) ?;
0 commit comments