Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 690A6200C1B for ; Mon, 9 Jan 2017 18:35:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 65C89160B3E; Mon, 9 Jan 2017 17:35:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B94B7160B49 for ; Mon, 9 Jan 2017 18:34:59 +0100 (CET) Received: (qmail 80963 invoked by uid 500); 9 Jan 2017 17:34:59 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 80935 invoked by uid 99); 9 Jan 2017 17:34:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2017 17:34:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A685D2C0453 for ; Mon, 9 Jan 2017 17:34:58 +0000 (UTC) Date: Mon, 9 Jan 2017 17:34:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-5395) support locally build distribution by script create_release_files.sh MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 09 Jan 2017 17:35:00 -0000 [ https://issues.apache.org/jira/browse/FLINK-5395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15812338#comment-15812338 ] ASF GitHub Bot commented on FLINK-5395: --------------------------------------- Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/3049#discussion_r95202903 --- Diff: tools/create_release_files.sh --- @@ -85,18 +88,74 @@ else MD5SUM="md5sum" fi +usage() { + set +x + echo "./create_release_files.sh --scala-version 2.11 --hadoop-version 2.7.2" + echo "" + echo "usage:" + echo "[--scala-version ] [--hadoop-version ]" + echo "" + echo "example:" + echo " sonatype_user=APACHEID sonatype_pw=APACHEIDPASSWORD \ " + echo " NEW_VERSION=1.2.0 \ " + echo " RELEASE_CANDIDATE="rc1" RELEASE_BRANCH=release-1.2.0 \ " + echo " OLD_VERSION=1.1-SNAPSHOT \ " + echo " USER_NAME=APACHEID \ " + echo " GPG_PASSPHRASE=XXX GPG_KEY=KEYID \ " + echo " GIT_AUTHOR=\"`git config --get user.name` <`git config --get user.email`>\" \ " + echo " IS_LOCAL_DIST=true GIT_REPO=github.com/apache/flink.git" + echo " ./create_release_files.sh --scala-version 2.11 --hadoop-version 2.7.2" + exit 1 +} + +# Parse arguments +while (( "$#" )); do + case $1 in + --scala-version) + scalaV="$2" + shift + ;; + --hadoop-version) + hadoopV="$2" + shift + ;; + --help) + usage + ;; + *) + break + ;; + esac + shift +done + +########################### prepare() { # prepare - git clone http://git-wip-us.apache.org/repos/asf/flink.git flink + target_branch=release-$RELEASE_VERSION-$RELEASE_CANDIDATE + if [ ! -d ./flink ]; then + git clone http://$GIT_REPO flink + else + # if flink git repo exist, delete target branch, delete builded distribution + rm -rf flink-*.tgz + cd flink + # try-catch + { + git pull --all + git checkout master + git branch -D $target_branch -f + } || { + echo "branch $target_branch maybe not found" --- End diff -- I think the error message should just be `branch $target_branch not found` without the maybe. > support locally build distribution by script create_release_files.sh > -------------------------------------------------------------------- > > Key: FLINK-5395 > URL: https://issues.apache.org/jira/browse/FLINK-5395 > Project: Flink > Issue Type: Improvement > Components: Build System > Reporter: shijinkui > > create_release_files.sh is build flink release only. It's hard to build custom local Flink release distribution. > Let create_release_files.sh support: > 1. custom git repo url > 2. custom build special scala and hadoop version > 3. add `tools/flink` to .gitignore > 4. add usage -- This message was sent by Atlassian JIRA (v6.3.4#6332)