You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2023/01/12 00:29:36 UTC

[arrow-adbc] branch main updated: chore(dev/release): add script to generate release post (#342)

This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 2b0acf3  chore(dev/release): add script to generate release post (#342)
2b0acf3 is described below

commit 2b0acf32c3288e76fe5c84a6cfbce111732d80a5
Author: David Li <li...@gmail.com>
AuthorDate: Wed Jan 11 19:29:30 2023 -0500

    chore(dev/release): add script to generate release post (#342)
    
    Fixes #331.
    
    Co-authored-by: Sutou Kouhei <ko...@cozmixng.org>
---
 dev/release/post-09-website.sh        | 114 ++++++++++++++++++++++++++++++++++
 docs/source/development/releasing.rst |  19 ++++--
 2 files changed, 127 insertions(+), 6 deletions(-)

diff --git a/dev/release/post-09-website.sh b/dev/release/post-09-website.sh
new file mode 100755
index 0000000..03e0dae
--- /dev/null
+++ b/dev/release/post-09-website.sh
@@ -0,0 +1,114 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -eu
+
+main() {
+    if [ "$#" -ne 3 ]; then
+        echo "Usage: $0 <arrow-site-checkout> <previous-version> <version>"
+        exit 1
+    fi
+    local -r arrow_site="$1"
+    local -r prev_version="$2"
+    local -r version="$3"
+
+    local -r source_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+    local -r source_top_dir="$( cd "${source_dir}/../../" && pwd )"
+
+    # Extract ADBC spec version from Doxygen macro in header.
+    local -r spec_version=$(grep '[\]version' "${source_top_dir}/adbc.h" | awk '{print $NF}')
+    local -r date=${POST_DATE:-$(date "+%Y-%m-%d")}
+    local -r filename="${arrow_site}/_posts/${date}-adbc-${version}-release.md"
+    local -r contributor_command="git shortlog --perl-regexp --author='^((?!dependabot\[bot\]).*)$' -sn apache-arrow-adbc-${prev_version}..apache-arrow-adbc-${version}"
+    local -r contributor_list=$(eval "${contributor_command}")
+    local -r contributors=$(echo "${contributor_list}" | wc -l)
+    local -r milestone_info=$(gh api /repos/apache/arrow-adbc/milestones -X GET -f 'state=closed' --jq ".[] | select(.title | test(\" ${version}\$\"))")
+    local -r milestone_number=$(echo "${milestone_info}" | jq -r '.number')
+    local -r milestone_url=$(echo "${milestone_info}" | jq -r '.html_url')
+    local -r issues=$(gh api graphql -f query="query { repository(owner: \"apache\", name: \"arrow-adbc\") { milestone(number:${milestone_number}) { issues(states:CLOSED) { totalCount } } } }" --jq '.data.repository.milestone.issues.totalCount')
+
+    cat <<EOF | tee "${filename}"
+---
+layout: post
+title: "Apache Arrow ADBC ${version} (Libraries) Release"
+date: "${date} 00:00:00"
+author: pmc
+categories: [release]
+---
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+The Apache Arrow team is pleased to announce the ${version} release of
+the Apache Arrow ADBC libraries. This covers includes [**${issues}
+resolved issues**][1] from [**${contributors} distinct contributors**][2].
+
+This is a release of the **libraries**, which are at version
+${version}.  The **API specification** is versioned separately and is
+at version ${spec_version}.
+
+The release notes below are not exhaustive and only expose selected
+highlights of the release. Many other bugfixes and improvements have
+been made: we refer you to the [complete changelog][3].
+
+## Release Highlights
+
+<!-- TODO: fill this portion in. -->
+
+## Contributors
+
+\`\`\`
+\$ ${contributor_command}
+${contributor_list}
+\`\`\`
+
+## Roadmap
+
+<!-- TODO: fill this portion in. -->
+
+## Getting Involved
+
+We welcome questions and contributions from all interested.  Issues
+can be filed on [GitHub][4], and questions can be directed to GitHub
+or the [Arrow mailing lists][5].
+
+[1]: ${milestone_url}
+[2]: #contributors
+[3]: https://github.com/apache/arrow-adbc/blob/apache-arrow-adbc-${version}/CHANGELOG.md
+[4]: https://github.com/apache/arrow-adbc/issues
+[5]: {% link community.md %}
+EOF
+
+}
+
+main "$@"
diff --git a/docs/source/development/releasing.rst b/docs/source/development/releasing.rst
index 9959772..8a2b901 100644
--- a/docs/source/development/releasing.rst
+++ b/docs/source/development/releasing.rst
@@ -354,12 +354,6 @@ Be sure to go through on the following checklist:
 
    The announcement to announce@apache.org must be sent from your apache.org e-mail address to be accepted.
 
-.. dropdown:: Publish release blog post
-   :class-title: sd-fs-5
-   :class-container: sd-shadow-md
-
-   TODO
-
 .. dropdown:: Remove old artifacts
    :class-title: sd-fs-5
    :class-container: sd-shadow-md
@@ -383,4 +377,17 @@ Be sure to go through on the following checklist:
       # dev/release/post-08-bump-versions.sh ../arrow 0.1.0 0.2.0
       dev/release/post-08-bump-versions.sh <arrow-dir> <version> <next_version>
 
+.. dropdown:: Publish release blog post
+   :class-title: sd-fs-5
+   :class-container: sd-shadow-md
+
+   Run the script to generate the blog post outline, then fill out the
+   outline and create a PR on `apache/arrow-site
+   <https://github.com/apache/arrow-site>`_.
+
+   .. code-block:: Bash
+
+      # dev/release/post-09-website.sh ../arrow-site 0.0.0 0.1.0
+      dev/release/post-09-website.sh <arrow-site-dir> <prev_version> <version>
+
 .. _nightly-website.yml: https://github.com/apache/arrow-adbc/actions/workflows/nightly-website.yml