From bb3caaf0e85e5e410dbbf08256e8d7a77e7f5cf2 Mon Sep 17 00:00:00 2001 From: v-jbrandrick <127887814+v-jbrandrick@users.noreply.github.com> Date: Thu, 7 Mar 2024 09:49:33 -0800 Subject: [PATCH 1/2] Adding csharp post-release Arrow-ADBC script and bumping the indices of other scripts --- dev/release/post-07-csharp.sh | 57 +++++++++++++++++++ ...cts.sh => post-08-remove-old-artifacts.sh} | 0 ...p-versions.sh => post-09-bump-versions.sh} | 0 ...{post-09-website.sh => post-10-website.sh} | 0 4 files changed, 57 insertions(+) create mode 100644 dev/release/post-07-csharp.sh rename dev/release/{post-07-remove-old-artifacts.sh => post-08-remove-old-artifacts.sh} (100%) rename dev/release/{post-08-bump-versions.sh => post-09-bump-versions.sh} (100%) rename dev/release/{post-09-website.sh => post-10-website.sh} (100%) diff --git a/dev/release/post-07-csharp.sh b/dev/release/post-07-csharp.sh new file mode 100644 index 0000000000..7b3506c999 --- /dev/null +++ b/dev/release/post-07-csharp.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# -*- indent-tabs-mode: nil; sh-indentation: 2; sh-basic-offset: 2 -*- +# +# 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 -e +set -u +set -o pipefail + +main() { + if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit + fi + + local -r version="$1" + + if [ -z "${NUGET_API_KEY}" ]; then + echo "NUGET_API_KEY is empty" + exit 1 + fi + + local base_names=() + base_names+=(Apache.Arrow.Adbc.${version}) + base_names+=(Apache.Arrow.Adbc.Client.${version}) + base_names+=(Apache.Arrow.Adbc.Drivers.BigQuery.${version}) + base_names+=(Apache.Arrow.Adbc.Drivers.FlightSql.${version}) + base_names+=(Apache.Arrow.Adbc.Drivers.Interop.Snowflake.${version}) + for base_name in ${base_names[@]}; do + dotnet nuget push \ + ${base_name}.nupkg \ + -k ${NUGET_API_KEY} \ + -s https://api.nuget.org/v3/index.json + rm -f ${base_name}.{nupkg,snupkg} + done + + echo "Success! The released NuGet package is available here:" + echo " https://www.nuget.org/packages/Apache.Arrow.Adbc/${version}" +} + +main "$@" diff --git a/dev/release/post-07-remove-old-artifacts.sh b/dev/release/post-08-remove-old-artifacts.sh similarity index 100% rename from dev/release/post-07-remove-old-artifacts.sh rename to dev/release/post-08-remove-old-artifacts.sh diff --git a/dev/release/post-08-bump-versions.sh b/dev/release/post-09-bump-versions.sh similarity index 100% rename from dev/release/post-08-bump-versions.sh rename to dev/release/post-09-bump-versions.sh diff --git a/dev/release/post-09-website.sh b/dev/release/post-10-website.sh similarity index 100% rename from dev/release/post-09-website.sh rename to dev/release/post-10-website.sh From e7e30c8f83d4d009b7d7d47f6e4ff5b7c2773ad9 Mon Sep 17 00:00:00 2001 From: v-jbrandrick <127887814+v-jbrandrick@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:53:43 -0700 Subject: [PATCH 2/2] Applying bash best practice suggestion and updating script indices in the release management guide --- dev/release/post-07-csharp.sh | 2 +- docs/source/development/releasing.rst | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/release/post-07-csharp.sh b/dev/release/post-07-csharp.sh index 7b3506c999..2ea4702014 100644 --- a/dev/release/post-07-csharp.sh +++ b/dev/release/post-07-csharp.sh @@ -42,7 +42,7 @@ main() { base_names+=(Apache.Arrow.Adbc.Drivers.BigQuery.${version}) base_names+=(Apache.Arrow.Adbc.Drivers.FlightSql.${version}) base_names+=(Apache.Arrow.Adbc.Drivers.Interop.Snowflake.${version}) - for base_name in ${base_names[@]}; do + for base_name in "${base_names[@]}"; do dotnet nuget push \ ${base_name}.nupkg \ -k ${NUGET_API_KEY} \ diff --git a/docs/source/development/releasing.rst b/docs/source/development/releasing.rst index bac560da22..8f539b4f94 100644 --- a/docs/source/development/releasing.rst +++ b/docs/source/development/releasing.rst @@ -382,7 +382,7 @@ Be sure to go through on the following checklist: .. code-block:: Bash - dev/release/post-07-remove-old-artifacts.sh + dev/release/post-08-remove-old-artifacts.sh .. dropdown:: Bump versions :class-title: sd-fs-5 @@ -394,8 +394,8 @@ Be sure to go through on the following checklist: .. code-block:: Bash - # dev/release/post-08-bump-versions.sh ../arrow 0.1.0 0.2.0 - dev/release/post-08-bump-versions.sh + # dev/release/post-09-bump-versions.sh ../arrow 0.1.0 0.2.0 + dev/release/post-09-bump-versions.sh .. dropdown:: Publish release blog post :class-title: sd-fs-5 @@ -407,7 +407,7 @@ Be sure to go through on the following checklist: .. code-block:: Bash - # dev/release/post-09-website.sh ../arrow-site 0.0.0 0.1.0 - dev/release/post-09-website.sh + # dev/release/post-10-website.sh ../arrow-site 0.0.0 0.1.0 + dev/release/post-10-website.sh .. _nightly-website.yml: https://github.com/apache/arrow-adbc/actions/workflows/nightly-website.yml