You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2019/01/24 03:29:21 UTC
[zeppelin] branch master updated: [hotfix] Fix release script
This is an automated email from the ASF dual-hosted git repository.
zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 29b301e [hotfix] Fix release script
29b301e is described below
commit 29b301e1a3b58ee59682672c12a085c4c3c232a9
Author: jeffzhang.zjf <je...@alibaba-inc.com>
AuthorDate: Thu Jan 24 10:59:09 2019 +0800
[hotfix] Fix release script
(cherry picked from commit 11335ff35a272321247e5dfcc3afaa9fea189b85)
---
dev/common_release.sh | 3 ++-
dev/create_release.sh | 10 +---------
dev/publish_release.sh | 14 ++++++--------
3 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/dev/common_release.sh b/dev/common_release.sh
index 6b7e901..8d0434a 100644
--- a/dev/common_release.sh
+++ b/dev/common_release.sh
@@ -31,6 +31,7 @@ if [[ -z "${WORKING_DIR}" ]]; then
WORKING_DIR="/tmp/zeppelin-release"
fi
+rm -rf "${WORKING_DIR}"
mkdir "${WORKING_DIR}"
# If set to 'yes', release script will deploy artifacts to SNAPSHOT repository.
@@ -42,7 +43,7 @@ usage() {
exit 1
}
-function git_clone() {
+function git_clone() {
echo "Clone the source"
# clone source
git clone https://git-wip-us.apache.org/repos/asf/zeppelin.git "${WORKING_DIR}/zeppelin"
diff --git a/dev/create_release.sh b/dev/create_release.sh
index ac4c67d..fdd33fb 100755
--- a/dev/create_release.sh
+++ b/dev/create_release.sh
@@ -55,11 +55,7 @@ function make_source_package() {
echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 --armor \
--output "zeppelin-${RELEASE_VERSION}.tgz.asc" \
--detach-sig "${WORKING_DIR}/zeppelin-${RELEASE_VERSION}.tgz"
- echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 \
- --print-md MD5 "zeppelin-${RELEASE_VERSION}.tgz" > \
- "${WORKING_DIR}/zeppelin-${RELEASE_VERSION}.tgz.md5"
- echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 \
- --print-md SHA512 "zeppelin-${RELEASE_VERSION}.tgz" > \
+ ${SHASUM} -a 512 "zeppelin-${RELEASE_VERSION}.tgz" > \
"${WORKING_DIR}/zeppelin-${RELEASE_VERSION}.tgz.sha512"
}
@@ -89,15 +85,11 @@ function make_binary_release() {
echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 --armor \
--output "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.asc" \
--detach-sig "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz"
- echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 --print-md MD5 \
- "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz" > \
- "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.md5"
${SHASUM} -a 512 "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz" > \
"zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.sha512"
mv "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz" "${WORKING_DIR}/"
mv "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.asc" "${WORKING_DIR}/"
- mv "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.md5" "${WORKING_DIR}/"
mv "zeppelin-${RELEASE_VERSION}-bin-${BIN_RELEASE_NAME}.tgz.sha512" "${WORKING_DIR}/"
# clean up build dir
diff --git a/dev/publish_release.sh b/dev/publish_release.sh
index b569ec4..b6bf39b 100755
--- a/dev/publish_release.sh
+++ b/dev/publish_release.sh
@@ -54,7 +54,6 @@ NEXUS_PROFILE="153446d1ac37c4"
function cleanup() {
echo "Remove working directory and maven local repository"
rm -rf ${WORKING_DIR}
- rm -rf ${tmp_repo}
}
function curl_error() {
@@ -126,13 +125,13 @@ function publish_to_maven() {
echo "Created Nexus staging repository: ${staged_repo_id}"
- tmp_repo="$(mktemp -d /tmp/zeppelin-repo-XXXXX)"
+ rm -rf $HOME/.m2/repository/org/apache/zeppelin
# build with scala-2.10
echo "mvn clean install -DskipTests \
- -Dmaven.repo.local=${tmp_repo} -Pscala-2.10 -Pbeam \
+ -Pscala-2.10 -Pbeam \
${PUBLISH_PROFILES} ${PROJECT_OPTIONS}"
- mvn clean install -DskipTests -Dmaven.repo.local="${tmp_repo}" -Pscala-2.10 -Pbeam \
+ mvn clean install -DskipTests -Pscala-2.10 -Pbeam \
${PUBLISH_PROFILES} ${PROJECT_OPTIONS}
if [[ $? -ne 0 ]]; then
echo "Build with scala 2.10 failed."
@@ -143,23 +142,22 @@ function publish_to_maven() {
"${BASEDIR}/change_scala_version.sh" 2.11
echo "mvn clean install -DskipTests \
- -Dmaven.repo.local=${tmp_repo} -Pscala-2.11 \
+ -Pscala-2.11 \
${PUBLISH_PROFILES} ${PROJECT_OPTIONS}"
- mvn clean install -DskipTests -Dmaven.repo.local="${tmp_repo}" -Pscala-2.11 \
+ mvn clean install -DskipTests -Pscala-2.11 \
${PUBLISH_PROFILES} ${PROJECT_OPTIONS}
if [[ $? -ne 0 ]]; then
echo "Build with scala 2.11 failed."
exit 1
fi
- pushd "${tmp_repo}/org/apache/zeppelin"
+ pushd "${HOME}/.m2/repository/org/apache/zeppelin"
find . -type f | grep -v '\.jar$' | grep -v '\.pom$' |grep -v '\.war$' | xargs rm
echo "Creating hash and signature files"
for file in $(find . -type f); do
echo "${GPG_PASSPHRASE}" | gpg --passphrase-fd 0 --output "${file}.asc" \
--detach-sig --armor "${file}"
- md5 -q "${file}" > "${file}.md5"
${SHASUM} -a 1 "${file}" | cut -f1 -d' ' > "${file}.sha1"
done