zentol commented on code in PR #1:
URL: 
https://github.com/apache/flink-connector-shared-utils/pull/1#discussion_r1011501540


##########
stage_jars.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_variable_set FLINK_MINOR_VERSION
+
+###########################
+
+function deploy_staging_jars {
+  cd "${SOURCE_DIR}"
+  mkdir -p "${RELEASE_DIR}"
+
+  project_version=$(get_pom_version)
+  if [[ ${project_version} =~ -SNAPSHOT$ ]]; then
+    echo "Jars should not be created for SNAPSHOT versions. Use 
'update_branch_version.sh' first."
+    exit 1
+  fi
+  version=$(project_version)-${FLINK_MINOR_VERSION}
+
+  echo "Deploying jars v${version} to repository.apache.org"
+  echo "To revert this step, login to 'https://repository.apache.org' -> 
'Staging repositories' -> Select repository -> 'Drop'"
+
+  clone_dir=$(create_pristine_source "${SOURCE_DIR}" "${RELEASE_DIR}")
+  cd "${clone_dir}"
+  set_pom_version "${version}"
+
+  options="-Prelease,docs-and-source -DskipTests 
-DretryFailedDeploymentCount=10"
+  ${MVN} clean deploy ${options}

Review Comment:
   This should set the `flink.version` property. May require the user to 
provide a full Flink version from which we extract the minor version.



-- 
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: dev-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to