You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by el...@apache.org on 2018/03/19 22:49:38 UTC

hbase-thirdparty git commit: HBASE-19560 Add a make_rc.sh

Repository: hbase-thirdparty
Updated Branches:
  refs/heads/master c685d9a9c -> f92dabc61


HBASE-19560 Add a make_rc.sh

Trim down core HBase's make_rc.sh for 3rdparty's use

Signed-off-by: Mike Drob <md...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/commit/f92dabc6
Tree: http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/tree/f92dabc6
Diff: http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/diff/f92dabc6

Branch: refs/heads/master
Commit: f92dabc61885104925a093b5aa917670dedc3d29
Parents: c685d9a
Author: Josh Elser <el...@apache.org>
Authored: Mon Mar 19 15:52:53 2018 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Mon Mar 19 18:49:18 2018 -0400

----------------------------------------------------------------------
 dev_files/make_rc.sh | 84 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase-thirdparty/blob/f92dabc6/dev_files/make_rc.sh
----------------------------------------------------------------------
diff --git a/dev_files/make_rc.sh b/dev_files/make_rc.sh
new file mode 100755
index 0000000..e56c2d5
--- /dev/null
+++ b/dev_files/make_rc.sh
@@ -0,0 +1,84 @@
+#!/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 that assembles all you need to make an RC. Does build of the tar.gzs
+# which it stashes into a dir above $(pwd) named for the script with a
+# timestamp suffix. Deploys builds to maven.
+#
+# To finish, check what was build.  If good, copy to dist.apache.org/dev and
+# close the maven repos.  Call a vote.
+#
+# Presumes your settings.xml all set up so can sign artifacts published to mvn, etc.
+
+set -e
+
+# Script checks out a tag, cleans the checkout and then builds src and bin
+# tarballs. It then deploys to the apache maven repository.
+# Presumes run from git dir.
+
+# Need a git tag to build.
+if [ "$1" = "" ]
+then
+  echo -n "Usage: $0 TAG_TO_PACKAGE"
+  exit 1
+fi
+git_tag=$1
+
+# Set mvn
+mvn=mvn
+if [ "$MAVEN" != "" ]; then
+  mvn="${MAVEN}"
+fi
+
+# Ensure we are inside a git repo before making progress
+# The below will fail if outside git.
+git -C . rev-parse
+
+# Checkout git_tag
+git checkout "${git_tag}"
+
+# Get mvn project version
+#shellcheck disable=SC2016
+version=$(${mvn} -q -N -Dexec.executable="echo" -Dexec.args='${project.version}' exec:exec)
+hbase_name="hbase-thirdparty-${version}"
+
+# Make a dir to save tgzs into.
+d=`date -u +"%Y%m%dT%H%M%SZ"`
+output_dir="${TMPDIR}/$hbase_name.$d"
+mkdir -p "${output_dir}"
+
+# Make sure all clean.
+git clean -f -x -d
+${mvn} clean
+
+# Run a rat check.
+${mvn} apache-rat:check
+
+# Build src.
+git archive --format=tar.gz --output="${output_dir}/${hbase_name}-src.tar.gz" --prefix="${hbase_name}/" "${git_tag}"
+
+# Deploy to mvn repository
+${mvn} clean deploy -Papache-release -Prelease
+
+# Do sha512
+cd ${output_dir}
+for i in *.tar.gz; do echo $i; gpg --print-md SHA512 $i > $i.sha512 ; done
+
+echo "Check the content of ${output_dir}.  If good, sign and push to dist.apache.org/dev"
+echo "  e.g. gpg --armor --output ${hbase_name}-src.tar.gz.asc --detach-sig ${hbase_name}-src.tar.gz "
+echo "Also, check the content deployed to maven.  If good, close the repo and record links of temporary staging repo"