|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +# |
| 4 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 | +# contributor license agreements. See the NOTICE file distributed with |
| 6 | +# this work for additional information regarding copyright ownership. |
| 7 | +# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 | +# (the "License"); you may not use this file except in compliance with |
| 9 | +# the License. You may obtain a copy of the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, software |
| 14 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | +# See the License for the specific language governing permissions and |
| 17 | +# limitations under the License. |
| 18 | +# |
| 19 | + |
| 20 | +set -o pipefail |
| 21 | +set -e |
| 22 | + |
| 23 | +RELEASE_DIR="$(cd "$(dirname "$0")"/..; pwd)" |
| 24 | +######### Please modify the variables ########## |
| 25 | +# release version, e.g. 1.4.0-incubating |
| 26 | +release_version=${release_version:-""} |
| 27 | +# release candidate number, e.g. 2 |
| 28 | +release_rc_no=${release_rc_no:-""} |
| 29 | +# previous release candidate number, e.g. 1, could be empty if it is the first vote |
| 30 | +prev_release_rc_no=${prev_release_rc_no:-""} |
| 31 | +# staging repository number, check it under https://repository.apache.org/content/repositories |
| 32 | +repo_no=${repo_no:-""} |
| 33 | +# vote email address in dev@kyuubi.apache.org, e.g. https://www.mail-archive.com/dev@kyuubi.apache.org/msg01458.html |
| 34 | +dev_kyuubi_vote_mail_address=${dev_kyuubi_vote_mail_address:-""} |
| 35 | +# vote result email address in dev@kyuubi.apache.org, e.g. https://www.mail-archive.com/dev@kyuubi.apache.org/msg01492.html |
| 36 | +dev_kyuubi_vote_result_mail_address=${dev_kyuubi_vote_result_mail_address:-""} |
| 37 | +################################################ |
| 38 | + |
| 39 | +if [[ -z $release_version ]]; then |
| 40 | + echo "Please input release version" |
| 41 | + exit 1 |
| 42 | +fi |
| 43 | +if [[ -z $release_rc_no ]]; then |
| 44 | + echo "Please input release rc number" |
| 45 | + exit 1 |
| 46 | +fi |
| 47 | +if [[ -z $repo_no ]]; then |
| 48 | + echo "Please input staging repository number, check it under https://repository.apache.org/content/repositories" |
| 49 | + exit 1 |
| 50 | +fi |
| 51 | +if [[ -z $dev_kyuubi_vote_mail_address ]]; then |
| 52 | + echo "Please input vote email address in dev@kyuubi.apache.org" |
| 53 | + exit 1 |
| 54 | +fi |
| 55 | +if [[ -z $dev_kyuubi_vote_result_mail_address ]]; then |
| 56 | + echo "vote result email address in dev@kyuubi.apache.org" |
| 57 | + exit 1 |
| 58 | +fi |
| 59 | + |
| 60 | +release_rc_tag=${release_version}-${release_rc_no} |
| 61 | +git_commit_hash=$(git rev-list -n 1 $release_rc_tag) |
| 62 | + |
| 63 | +echo "Release version: ${release_version}" |
| 64 | +echo "Release candidate number: ${release_rc_no}" |
| 65 | +echo "Previous release candidate number: ${prev_release_rc_no}" |
| 66 | +echo "Staging repository number: ${repo_no}" |
| 67 | +echo "Vote email address in dev@kyuubi.apache.org: ${dev_kyuubi_vote_mail_address}" |
| 68 | +echo "Vote result email address in dev@kyuubi.apache.org: ${dev_kyuubi_vote_result_mail_address}" |
| 69 | +echo "Release candidate tag: ${release_rc_tag}" |
| 70 | +echo "Release candidate tag commit hash: ${git_commit_hash}" |
| 71 | + |
| 72 | +if [[ ! -z "$prev_release_rc_no" ]]; then |
| 73 | + prev_release_rc_tag=${release_version}-${prev_release_rc_no} |
| 74 | + change_from_pre_commit=" |
| 75 | +The commit list since the ${prev_release_rc_no}: |
| 76 | +https://github.com/apache/incubator-kyuubi/compare/${prev_release_rc_tag}...${release_rc_tag} |
| 77 | +" |
| 78 | +fi |
| 79 | + |
| 80 | +RELEASE_TEMP_DIR=${RELEASE_DIR}/tmp |
| 81 | +mkdir -p ${RELEASE_TEMP_DIR} |
| 82 | +GENERAL_VOTE=${RELEASE_TEMP_DIR}/${release_rc_tag}_general_vote.temp |
| 83 | + |
| 84 | +cat >$GENERAL_VOTE<<EOF |
| 85 | +Title: [VOTE] Release Apache Kyuubi(Incubating) ${release_version} ${release_rc_no} |
| 86 | +
|
| 87 | +Content: |
| 88 | +Hello Incubator Community, |
| 89 | +
|
| 90 | +The Apache Kyuubi community has voted on and approved a proposal to release |
| 91 | +Apache Kyuubi(Incubating) version ${release_version} ${release_rc_no}. |
| 92 | +
|
| 93 | +We now kindly request the Incubator PMC members review and vote on this |
| 94 | +incubator release. |
| 95 | +
|
| 96 | +Kyuubi community vote thread: |
| 97 | +${dev_kyuubi_vote_mail_address} |
| 98 | +
|
| 99 | +Vote result thread: |
| 100 | +${dev_kyuubi_vote_result_mail_address} |
| 101 | +
|
| 102 | +[ ] +1 Release this package as Apache Kyuubi ${release_version} |
| 103 | +[ ] +0 |
| 104 | +[ ] -1 Do not release this package because ... |
| 105 | +
|
| 106 | +To learn more about Apache Kyuubi (Incubating), please see |
| 107 | +https://kyuubi.apache.org/ |
| 108 | +
|
| 109 | +The tag to be voted on is ${release_rc_tag} (commit ${git_commit_hash}): |
| 110 | +https://github.com/apache/incubator-kyuubi/tree/${release_rc_tag} |
| 111 | +
|
| 112 | +The release files, including signatures, digests, etc. can be found at: |
| 113 | +https://dist.apache.org/repos/dist/dev/incubator/kyuubi/${release_rc_tag}/ |
| 114 | +
|
| 115 | +Signatures used for Kyuubi RCs can be found in this file: |
| 116 | +https://downloads.apache.org/incubator/kyuubi/KEYS |
| 117 | +
|
| 118 | +The staging repository for this release can be found at: |
| 119 | +https://repository.apache.org/content/repositories/orgapachekyuubi-${repo_no}/ |
| 120 | +$change_from_pre_commit |
| 121 | +The release note is available in: |
| 122 | +https://github.com/apache/incubator-kyuubi/releases/tag/${release_rc_tag} |
| 123 | +
|
| 124 | +
|
| 125 | +Thanks, |
| 126 | +On behalf of Apache Kyuubi(Incubating) community |
| 127 | +EOF |
| 128 | + |
| 129 | +echo "please use general@incubator.apache.com |
| 130 | +see vote content in $GENERAL_VOTE |
| 131 | +please check all the links and ensure they are available" |
0 commit comments