Skip to content

Commit

Permalink
Sync 3.26.1 News and Release Script Updates
Browse files Browse the repository at this point in the history
Added a small utility to cherry pick GitHub PRs to help prepare micro
releases and fixed updating links in README for micro releases.
  • Loading branch information
iguessthislldo committed Nov 17, 2023
1 parent 230e75d commit d200ca8
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 25 deletions.
16 changes: 16 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# OpenDDS Releases

## Version 3.26.1 of OpenDDS

Released 2023-11-14

Download [this release on GitHub](https://github.com/OpenDDS/OpenDDS/releases/tag/DDS-3.26.1).

Read [the documenation for this release on Read the Docs](https://opendds.readthedocs.io/en/dds-3.26.1).

### Fixes

* Building with CMake
* Fixed [Issue #4328](https://github.com/OpenDDS/OpenDDS/issues/4328), where each run of CMake effectively always appended the MPC features to `default.features` in ACE. ([PR #4330](https://github.com/OpenDDS/OpenDDS/pull/4330))

* Fixed a corner case in RTPS ParameterList parsing ([PR #4336](https://github.com/OpenDDS/OpenDDS/pull/4336))
* Reject some types of invalid RTPS DataFrag submessages ([PR #4348](https://github.com/OpenDDS/OpenDDS/pull/4348))

## Version 3.26.0 of OpenDDS

Released 2023-10-23
Expand Down
17 changes: 17 additions & 0 deletions docs/news.d/_releases/v3.26.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Released 2023-11-14

Download :ghrelease:`this release on GitHub <DDS-3.26.1>`.

Read `the documenation for this release on Read the Docs <https://opendds.readthedocs.io/en/dds-3.26.1>`__.

Fixes
=====

- Building with CMake

- Fixed :ghissue:`4328`, where each run of CMake effectively always appended the MPC features to ``default.features`` in ACE. (:ghpr:`4330`)

- Fixed a corner case in RTPS ParameterList parsing (:ghpr:`4336`)

- Reject some types of invalid RTPS DataFrag submessages (:ghpr:`4348`)

7 changes: 0 additions & 7 deletions docs/news.d/cmake-features.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/news.d/rtps-badmsg.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/news.d/rtps-parameterlist.rst

This file was deleted.

52 changes: 46 additions & 6 deletions tools/scripts/gitrelease.pl
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,24 @@ sub get_version_line {
return $line;
}

sub git_tag {
my $version = shift();

return "${git_name_prefix}$version->{tag_string}";
}

sub get_rtd_link {
my $settings = shift();
my $post_release = shift() // 0;

return "$rtd_url/en/" . ($post_release ? 'latest-release' : lc($settings->{git_tag}));
my $last_tag = 'lastest-release';
if ($settings->{micro}) {
my $v = $settings->{parsed_version};
my $last_micro = $v->{micro} - 1;
$last_tag = lc(git_tag(parse_version("$v->{major}.$v->{minor}.$last_micro")));
}

return "$rtd_url/en/" . ($post_release ? $last_tag : lc($settings->{git_tag})) . "/";
}

sub usage {
Expand Down Expand Up @@ -159,6 +172,7 @@ sub help {
" This doesn't run any release steps or require the\n" .
" WORKSPACE or VERSION arguments, but does require the\n" .
" GITHUB_TOKEN environment variable\n" .
" --cherry-pick-prs PR.. Use git cherry-pick from the given GitHub PRs.\n" .
"\n" .
"Environment Variables:\n" .
" GITHUB_TOKEN GitHub token with repo access to publish release on\n" .
Expand Down Expand Up @@ -911,6 +925,27 @@ sub upload_shapes_demo {
"\nGithub upload failed, try again");
}

sub cherry_pick_prs {
my $settings = shift();
if (scalar(@_) == 0) {
arg_error("Expecting PR arguments");
}

my $ph = Pithub->new(
user => $settings->{github_user},
repo => $settings->{github_repo},
);

foreach my $prnum (@_) {
print("Cherry picking PR #$prnum\n");
my $result = $ph->pull_requests->commits(pull_request_id => $prnum);
check_pithub_result($result);
my $first_commit = $result->content->[0]->{sha};
my $last_commit = $result->content->[-1]->{sha};
run_command(['git', 'cherry-pick', "$first_commit^..$last_commit"], autodie => 1)
}
}

my $step_subexpr_re = qr/(\^?)(\d*)(-?)(\d*)/;
my $step_expr_re = qr/^${step_subexpr_re}(,${step_subexpr_re})*$/;

Expand Down Expand Up @@ -2918,6 +2953,7 @@ sub remedy_release_occurred_flag {
my $upload_shapes_demo = 0;
my $update_authors = 0;
my $update_ace_tao = 0;
my $cherry_pick_prs = 0;

GetOptions(
'help' => \$print_help,
Expand All @@ -2943,6 +2979,7 @@ sub remedy_release_occurred_flag {
'upload-shapes-demo' => \$upload_shapes_demo,
'update-authors' => \$update_authors,
'update-ace-tao' => \$update_ace_tao,
'cherry-pick-prs' => \$cherry_pick_prs,
) or arg_error("Invalid option");

if ($print_help) {
Expand All @@ -2968,7 +3005,7 @@ sub remedy_release_occurred_flag {
my $base_name = "";
my $release_branch = "";

my $ignore_args = $update_authors || $print_list_all || $update_ace_tao;
my $ignore_args = $update_authors || $print_list_all || $update_ace_tao || $cherry_pick_prs;
if ($ignore_args) {
$parsed_version = $zero_version;
$parsed_next_version = $zero_version;
Expand Down Expand Up @@ -3056,7 +3093,7 @@ sub remedy_release_occurred_flag {
next_version => $next_version,
parsed_next_version => $parsed_next_version,
base_name => $base_name,
git_tag => "${git_name_prefix}$parsed_version->{tag_string}",
git_tag => git_tag($parsed_version),
tgz_worktree => "$workspace/tgz/${base_name}",
zip_worktree => "$workspace/zip/${base_name}",
doxygen_dir => $doxygen_dir,
Expand Down Expand Up @@ -3365,6 +3402,9 @@ sub remedy_release_occurred_flag {
},
message => sub{message_update_readme_file(@_, 1)},
remedy => sub{remedy_update_readme_file(@_, 1)},
# Otherwise this would revert the README to the last micro version and it
# doesn't make sense for it to be latest-release, so just leave it.
skip => $global_settings{micro},
can_force => 1,
post_release => 1,
},
Expand Down Expand Up @@ -3547,15 +3587,15 @@ sub run_step {
$step->{verified} = 1;
}

my $alt = $upload_shapes_demo || $update_authors;
my $alt = $upload_shapes_demo || $update_authors || $cherry_pick_prs;
if ($upload_shapes_demo) {
upload_shapes_demo(\%global_settings);
}
elsif ($update_authors) {
remedy_authors(\%global_settings);
}
elsif ($update_ace_tao) {
update_ace_tao(\%global_settings);
elsif ($cherry_pick_prs) {
cherry_pick_prs(\%global_settings, map { int($_) } @ARGV);
}
elsif (!$alt && ($ignore_args || ($workspace && $parsed_version))) {
my @steps_to_do;
Expand Down

0 comments on commit d200ca8

Please sign in to comment.