MartijnVisser commented on code in PR #63:
URL: 
https://github.com/apache/flink-connector-shared-utils/pull/63#discussion_r4378454669


##########
stage_source_release_atr.sh:
##########
@@ -0,0 +1,55 @@
+#!/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.
+
+SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
+
+source "${SCRIPT_DIR}/_init.sh"
+source "${SCRIPT_DIR}/_utils.sh"
+
+###########################
+
+check_variables_set ATR_UID
+
+ATR_HOST=${ATR_HOST:-releases.apache.org}
+
+###########################
+
+function check_rsync {
+  # ATR rejects the arguments that macOS's built-in openrsync sends
+  if rsync --version 2>&1 | grep -q openrsync; then
+    echo "openrsync is not supported by ATR. Install rsync, for example with 
'brew install rsync'."
+    exit 1
+  fi
+}
+
+function upload_source_release {
+  cd ${SOURCE_DIR}
+  project=${PROJECT:-${PWD##*/}}
+  version=$(get_pom_version)
+
+  echo "Uploading source release v${version} to the ${project} ${version} 
draft on ${ATR_HOST}"
+  echo "To revert this step, delete the files on the release's Compose page on 
https://${ATR_HOST}";
+
+  rsync -av -e 'ssh -p 2222' "${ARTIFACTS_DIR}/" 
"${ATR_UID}@${ATR_HOST}:/${project}/${version}/"

Review Comment:
   Not yet, only with the upload stubbed. 5.1.0 is the first real run; I'll 
update this PR if it needs a change.



##########
_utils.sh:
##########
@@ -93,4 +93,36 @@ function is_flink_version_set_in_pom {
     echo "Unexpected flink.version '${version}'." >&2
     exit 1
   fi
-}
\ No newline at end of file
+}
+
+function create_source_release {
+  cd ${SOURCE_DIR}
+  mkdir -p ${RELEASE_DIR}
+  mkdir -p ${ARTIFACTS_DIR}

Review Comment:
   Good catch: on a rerun gpg stops to ask about overwriting the `.asc`. Fixed 
in a separate commit, so `stage_source_release.sh` gets it too.



##########
stage_source_release_atr.sh:
##########
@@ -0,0 +1,55 @@
+#!/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.
+
+SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
+
+source "${SCRIPT_DIR}/_init.sh"
+source "${SCRIPT_DIR}/_utils.sh"
+
+###########################
+
+check_variables_set ATR_UID
+
+ATR_HOST=${ATR_HOST:-releases.apache.org}
+
+###########################
+
+function check_rsync {
+  # ATR rejects the arguments that macOS's built-in openrsync sends
+  if rsync --version 2>&1 | grep -q openrsync; then

Review Comment:
   Agreed, but later: in `check_environment.sh` it can only warn, since 
releases through dist/dev don't upload with rsync.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to