File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -2054,8 +2054,6 @@ pub struct UpdatedRelease {
20542054 pub projects : Option < Vec < String > > ,
20552055 #[ serde( skip_serializing_if = "Option::is_none" ) ]
20562056 pub url : Option < String > ,
2057- #[ serde( rename = "dateStarted" , skip_serializing_if = "Option::is_none" ) ]
2058- pub date_started : Option < DateTime < Utc > > ,
20592057 #[ serde( rename = "dateReleased" , skip_serializing_if = "Option::is_none" ) ]
20602058 pub date_released : Option < DateTime < Utc > > ,
20612059 #[ serde( skip_serializing_if = "Option::is_none" ) ]
Original file line number Diff line number Diff line change @@ -20,9 +20,10 @@ pub fn make_command(command: Command) -> Command {
2020 . arg (
2121 Arg :: new ( "started" )
2222 . long ( "started" )
23+ . hide ( true )
2324 . value_parser ( get_timestamp)
2425 . value_name ( "TIMESTAMP" )
25- . help ( "Set the release start date ." ) ,
26+ . help ( "[DEPRECATED] This value is ignored ." ) ,
2627 )
2728 . arg (
2829 Arg :: new ( "released" )
@@ -38,13 +39,19 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
3839 let api = Api :: current ( ) ;
3940 let version = matches. get_one :: < String > ( "version" ) . unwrap ( ) ;
4041
42+ if matches. get_one :: < DateTime < Utc > > ( "started" ) . is_some ( ) {
43+ log:: warn!(
44+ "The --started flag is deprecated. Its value is ignored, \
45+ and the argument will be completely removed in a future version."
46+ ) ;
47+ }
48+
4149 api. authenticated ( ) ?. update_release (
4250 & config. get_org ( matches) ?,
4351 version,
4452 & UpdatedRelease {
4553 projects : config. get_projects ( matches) . ok ( ) ,
4654 url : matches. get_one :: < String > ( "url" ) . cloned ( ) ,
47- date_started : matches. get_one :: < DateTime < Utc > > ( "started" ) . copied ( ) ,
4855 date_released : Some (
4956 matches
5057 . get_one :: < DateTime < Utc > > ( "released" )
Original file line number Diff line number Diff line change 11```
2- $ sentry-cli releases finalize wat-release --started 1431648100 -- released 1431648000
2+ $ sentry-cli releases finalize wat-release --released 1431648000
33? success
44Finalized release wat-release
55
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ fn release_with_custom_dates() {
4141 . with_response_file ( "releases/get-release.json" )
4242 . with_matcher ( Matcher :: PartialJson ( json ! ( {
4343 "projects" : [ "wat-project" ] ,
44- "dateStarted" : "2015-05-15T00:01:40Z" ,
4544 "dateReleased" : "2015-05-15T00:00:00Z"
4645 } ) ) ) ,
4746 )
You can’t perform that action at this time.
0 commit comments