Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-5395

support locally build distribution by script create_release_files.sh

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0, 1.3.0
    • Component/s: Build System
    • Labels:
      None

      Description

      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

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shijinkui commented on the issue:

          https://github.com/apache/flink/pull/3049

          OK

          Show
          githubbot ASF GitHub Bot added a comment - Github user shijinkui commented on the issue: https://github.com/apache/flink/pull/3049 OK
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3049

          I fixed the mentioned issues in http://git-wip-us.apache.org/repos/asf/flink/commit/5f0d8c9d

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3049 I fixed the mentioned issues in http://git-wip-us.apache.org/repos/asf/flink/commit/5f0d8c9d
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3049#discussion_r97540542

          — Diff: tools/create_release_files.sh —
          @@ -201,19 +274,34 @@ prepare

          make_source_release

          -make_binary_release "hadoop2" "" 2.10
          -make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.10
          -make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.10
          -make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.10
          -
          -make_binary_release "hadoop2" "" 2.11
          -make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.11
          -make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.11
          -make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.11
          -
          -copy_data
          -
          -deploy_to_maven
          +# build dist by input parameter of "--scala-vervion xxx --hadoop-version xxx"
          +if [ "$SCALA_VERSION" == "none" ] && [ "$HADOOP_VERSION" == "none" ]; then
          + make_binary_release "hadoop2" "" 2.10
          + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "2.10"
          + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "2.10"
          + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "2.10"
          +
          + make_binary_release "hadoop2" "" 2.11
          + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "2.11"
          + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "2.11"
          + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "2.11"
          +elif [ "$SCALA_VERSION" == none ] && [ "$HADOOP_VERSION" != "none" ]
          +then
          + make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.10"
          + make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.11"
          +elif [ "$SCALA_VERSION" != none ] && [ "$HADOOP_VERSION" == "none" ]
          +then
          + make_binary_release "hadoop2" "" $SCALA_VERSION
          + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "$SCALA_VERSION"
          + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "$SCALA_VERSION"
          + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "$SCALA_VERSION"
          +else
          + make_binary_release "hadoop2x" "-Dhadoop.version=$HADOOP_VERSION" "$SCALA_VERSION"
          +fi

          +if [ ! IS_LOCAL_DIST ] ; then
          — End diff –

          this as well

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on a diff in the pull request: https://github.com/apache/flink/pull/3049#discussion_r97540542 — Diff: tools/create_release_files.sh — @@ -201,19 +274,34 @@ prepare make_source_release -make_binary_release "hadoop2" "" 2.10 -make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.10 -make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.10 -make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.10 - -make_binary_release "hadoop2" "" 2.11 -make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.11 -make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.11 -make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.11 - -copy_data - -deploy_to_maven +# build dist by input parameter of "--scala-vervion xxx --hadoop-version xxx" +if [ "$SCALA_VERSION" == "none" ] && [ "$HADOOP_VERSION" == "none" ]; then + make_binary_release "hadoop2" "" 2.10 + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "2.10" + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "2.10" + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "2.10" + + make_binary_release "hadoop2" "" 2.11 + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "2.11" + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "2.11" + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "2.11" +elif [ "$SCALA_VERSION" == none ] && [ "$HADOOP_VERSION" != "none" ] +then + make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.10" + make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.11" +elif [ "$SCALA_VERSION" != none ] && [ "$HADOOP_VERSION" == "none" ] +then + make_binary_release "hadoop2" "" $SCALA_VERSION + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "$SCALA_VERSION" + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "$SCALA_VERSION" + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "$SCALA_VERSION" +else + make_binary_release "hadoop2x" "-Dhadoop.version=$HADOOP_VERSION" "$SCALA_VERSION" +fi +if [ ! IS_LOCAL_DIST ] ; then — End diff – this as well
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3049#discussion_r97540513

          — Diff: tools/create_release_files.sh —
          @@ -117,10 +184,13 @@ make_source_release() {
          perl -pi -e "s#^version_short: .*#version_short: $

          {NEW_VERSION}

          #" _config.yml
          cd ..

          • git commit --author="$GIT_AUTHOR" -am "Commit for release $RELEASE_VERSION"
          • git remote add asf_push https://$USER_NAME@git-wip-us.apache.org/repos/asf/flink.git
          • RELEASE_HASH=`git rev-parse HEAD`
          • echo "Echo created release hash $RELEASE_HASH"
            + # local dist have no need to commit to remote
            + if [ ! IS_LOCAL_DIST ]; then
              • End diff –

          (Note to myself: This doesn't work)

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on a diff in the pull request: https://github.com/apache/flink/pull/3049#discussion_r97540513 — Diff: tools/create_release_files.sh — @@ -117,10 +184,13 @@ make_source_release() { perl -pi -e "s#^version_short: .*#version_short: $ {NEW_VERSION} #" _config.yml cd .. git commit --author="$GIT_AUTHOR" -am "Commit for release $RELEASE_VERSION" git remote add asf_push https://$USER_NAME@git-wip-us.apache.org/repos/asf/flink.git RELEASE_HASH=`git rev-parse HEAD` echo "Echo created release hash $RELEASE_HASH" + # local dist have no need to commit to remote + if [ ! IS_LOCAL_DIST ]; then End diff – (Note to myself: This doesn't work)
          Show
          rmetzger Robert Metzger added a comment - Resolved for 1.2 in http://git-wip-us.apache.org/repos/asf/flink/commit/2e175fb3 Resolved for 1.3 in http://git-wip-us.apache.org/repos/asf/flink/commit/6b55e2ca
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/3049

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3049
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user rmetzger commented on the issue:

          https://github.com/apache/flink/pull/3049

          +1 is good to merge.

          I'll test it as part of the RC1 for 1.2.0 creation

          Show
          githubbot ASF GitHub Bot added a comment - Github user rmetzger commented on the issue: https://github.com/apache/flink/pull/3049 +1 is good to merge. I'll test it as part of the RC1 for 1.2.0 creation
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shijinkui commented on the issue:

          https://github.com/apache/flink/pull/3049

          > Before merging this, we would definitely have to run the script as well. I did not do this and hence I would wait with merging this.
          @uce @rmetzger I use this script build local distribution successfully. But the apache release have not try.

          Show
          githubbot ASF GitHub Bot added a comment - Github user shijinkui commented on the issue: https://github.com/apache/flink/pull/3049 > Before merging this, we would definitely have to run the script as well. I did not do this and hence I would wait with merging this. @uce @rmetzger I use this script build local distribution successfully. But the apache release have not try.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shijinkui commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3049#discussion_r95276351

          — Diff: tools/create_release_files.sh —
          @@ -66,16 +66,19 @@ fi
          GPG_PASSPHRASE=$

          {GPG_PASSPHRASE:-XXX}

          GPG_KEY=$

          {GPG_KEY:-XXX}

          GIT_AUTHOR=$

          {GIT_AUTHOR:-"Your name <you@apache.org>"}

          -OLD_VERSION=$

          {OLD_VERSION:-1.1-SNAPSHOT}

          -RELEASE_VERSION=$

          {NEW_VERSION}

          +OLD_VERSION=$

          {OLD_VERSION:-1.2-SNAPSHOT}

          +RELEASE_VERSION=$

          {NEW_VERSION:-1.3-SNAPSHOT}

          RELEASE_CANDIDATE=$

          {RELEASE_CANDIDATE:-rc1}

          RELEASE_BRANCH=$

          {RELEASE_BRANCH:-master}

          USER_NAME=$

          {USER_NAME:-yourapacheidhere}

          MVN=$

          {MVN:-mvn}

          GPG=$

          {GPG:-gpg}

          sonatype_user=$

          {sonatype_user:-yourapacheidhere}

          sonatype_pw=$

          {sonatype_pw:-XXX}

          -
          +IS_LOCAL_DIST=$

          {IS_LOCAL_DIST:-false}

          +GIT_REPO=$

          {GIT_REPO:-git-wip-us.apache.org/repos/asf/flink.git}

          +scalaV=none
          — End diff –

          That' fine.

          Show
          githubbot ASF GitHub Bot added a comment - Github user shijinkui commented on a diff in the pull request: https://github.com/apache/flink/pull/3049#discussion_r95276351 — Diff: tools/create_release_files.sh — @@ -66,16 +66,19 @@ fi GPG_PASSPHRASE=$ {GPG_PASSPHRASE:-XXX} GPG_KEY=$ {GPG_KEY:-XXX} GIT_AUTHOR=$ {GIT_AUTHOR:-"Your name <you@apache.org>"} -OLD_VERSION=$ {OLD_VERSION:-1.1-SNAPSHOT} -RELEASE_VERSION=$ {NEW_VERSION} +OLD_VERSION=$ {OLD_VERSION:-1.2-SNAPSHOT} +RELEASE_VERSION=$ {NEW_VERSION:-1.3-SNAPSHOT} RELEASE_CANDIDATE=$ {RELEASE_CANDIDATE:-rc1} RELEASE_BRANCH=$ {RELEASE_BRANCH:-master} USER_NAME=$ {USER_NAME:-yourapacheidhere} MVN=$ {MVN:-mvn} GPG=$ {GPG:-gpg} sonatype_user=$ {sonatype_user:-yourapacheidhere} sonatype_pw=$ {sonatype_pw:-XXX} - +IS_LOCAL_DIST=$ {IS_LOCAL_DIST:-false} +GIT_REPO=$ {GIT_REPO:-git-wip-us.apache.org/repos/asf/flink.git} +scalaV=none — End diff – That' fine.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user uce commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3049#discussion_r95202566

          — Diff: tools/create_release_files.sh —
          @@ -66,16 +66,19 @@ fi
          GPG_PASSPHRASE=$

          {GPG_PASSPHRASE:-XXX}

          GPG_KEY=$

          {GPG_KEY:-XXX}

          GIT_AUTHOR=$

          {GIT_AUTHOR:-"Your name <you@apache.org>"}

          -OLD_VERSION=$

          {OLD_VERSION:-1.1-SNAPSHOT}

          -RELEASE_VERSION=$

          {NEW_VERSION}

          +OLD_VERSION=$

          {OLD_VERSION:-1.2-SNAPSHOT}

          +RELEASE_VERSION=$

          {NEW_VERSION:-1.3-SNAPSHOT}

          RELEASE_CANDIDATE=$

          {RELEASE_CANDIDATE:-rc1}

          RELEASE_BRANCH=$

          {RELEASE_BRANCH:-master}

          USER_NAME=$

          {USER_NAME:-yourapacheidhere}

          MVN=$

          {MVN:-mvn}

          GPG=$

          {GPG:-gpg}

          sonatype_user=$

          {sonatype_user:-yourapacheidhere}

          sonatype_pw=$

          {sonatype_pw:-XXX}

          -
          +IS_LOCAL_DIST=$

          {IS_LOCAL_DIST:-false}

          +GIT_REPO=$

          {GIT_REPO:-git-wip-us.apache.org/repos/asf/flink.git}

          +scalaV=none
          — End diff –

          Should we rename this to `SCALA_VERSION` and `HADOOP_VERSION` in order to follow the style of the other variables?

          Show
          githubbot ASF GitHub Bot added a comment - Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/3049#discussion_r95202566 — Diff: tools/create_release_files.sh — @@ -66,16 +66,19 @@ fi GPG_PASSPHRASE=$ {GPG_PASSPHRASE:-XXX} GPG_KEY=$ {GPG_KEY:-XXX} GIT_AUTHOR=$ {GIT_AUTHOR:-"Your name <you@apache.org>"} -OLD_VERSION=$ {OLD_VERSION:-1.1-SNAPSHOT} -RELEASE_VERSION=$ {NEW_VERSION} +OLD_VERSION=$ {OLD_VERSION:-1.2-SNAPSHOT} +RELEASE_VERSION=$ {NEW_VERSION:-1.3-SNAPSHOT} RELEASE_CANDIDATE=$ {RELEASE_CANDIDATE:-rc1} RELEASE_BRANCH=$ {RELEASE_BRANCH:-master} USER_NAME=$ {USER_NAME:-yourapacheidhere} MVN=$ {MVN:-mvn} GPG=$ {GPG:-gpg} sonatype_user=$ {sonatype_user:-yourapacheidhere} sonatype_pw=$ {sonatype_pw:-XXX} - +IS_LOCAL_DIST=$ {IS_LOCAL_DIST:-false} +GIT_REPO=$ {GIT_REPO:-git-wip-us.apache.org/repos/asf/flink.git} +scalaV=none — End diff – Should we rename this to `SCALA_VERSION` and `HADOOP_VERSION` in order to follow the style of the other variables?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user uce commented on a diff in the pull request:

          https://github.com/apache/flink/pull/3049#discussion_r95203611

          — Diff: tools/create_release_files.sh —
          @@ -201,19 +262,34 @@ prepare

          make_source_release

          -make_binary_release "hadoop2" "" 2.10
          -make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.10
          -make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.10
          -make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.10
          -
          -make_binary_release "hadoop2" "" 2.11
          -make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.11
          -make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.11
          -make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.11
          -
          -copy_data
          -
          -deploy_to_maven
          +# build dist by input parameter of "--scala-vervion xxx --hadoop-version xxx"
          +if [ "$scalaV" == "none" ] && [ "$hadoopV" == "none" ]; then
          + make_binary_release "hadoop2" "" 2.10
          + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.10
          + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.10
          + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.10
          +
          + make_binary_release "hadoop2" "" 2.11
          + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.11
          + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.11
          + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.11
          +elif [ "$scalaV" == none ] && [ "$hadoopV" != "none" ]
          — End diff –

          Can we add the `"..."` for all strings to have it consistent?

          Show
          githubbot ASF GitHub Bot added a comment - Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/3049#discussion_r95203611 — Diff: tools/create_release_files.sh — @@ -201,19 +262,34 @@ prepare make_source_release -make_binary_release "hadoop2" "" 2.10 -make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.10 -make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.10 -make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.10 - -make_binary_release "hadoop2" "" 2.11 -make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.11 -make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.11 -make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.11 - -copy_data - -deploy_to_maven +# build dist by input parameter of "--scala-vervion xxx --hadoop-version xxx" +if [ "$scalaV" == "none" ] && [ "$hadoopV" == "none" ]; then + make_binary_release "hadoop2" "" 2.10 + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.10 + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.10 + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.10 + + make_binary_release "hadoop2" "" 2.11 + make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" 2.11 + make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" 2.11 + make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" 2.11 +elif [ "$scalaV" == none ] && [ "$hadoopV" != "none" ] — End diff – Can we add the `"..."` for all strings to have it consistent?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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 <version>] [--hadoop-version <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() {

          1. 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.

          Show
          githubbot ASF GitHub Bot added a comment - 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 <version>] [--hadoop-version <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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user StephanEwen commented on the issue:

          https://github.com/apache/flink/pull/3049

          Thank you for this contribution. Looks good at a first glance.

          Would be good if @uce or @rmetzger could take a look, they worked mostly with the release script.

          Show
          githubbot ASF GitHub Bot added a comment - Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/3049 Thank you for this contribution. Looks good at a first glance. Would be good if @uce or @rmetzger could take a look, they worked mostly with the release script.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user shijinkui opened a pull request:

          https://github.com/apache/flink/pull/3049

          FLINK-5395 [Build System] support locally build distribution by script create_release_files.sh

          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

          • [X] General
          • The pull request references the related JIRA issue ("FLINK-5395 support locally build distribution by script create_release_files.sh")
          • The pull request addresses only one issue
          • Each commit in the PR has a meaningful commit message (including the JIRA id)
          • [X] Documentation
          • Documentation has been added for new functionality
          • Old documentation affected by the pull request has been updated
          • JavaDoc for public methods has been added
          • [X] Tests & Build
          • Functionality added by the pull request is covered by tests
          • `mvn clean verify` has been executed successfully locally or a Travis build has passed

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/shijinkui/flink FLINK-5395

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/3049.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #3049


          commit 3b41c0942ef7ddd5921a32afbee2133392a594b7
          Author: shijinkui <shijinkui@huawei.com>
          Date: 2016-12-27T15:51:10Z

          FLINK-5395 [Build System] support locally build distribution by script create_release_files.sh


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user shijinkui opened a pull request: https://github.com/apache/flink/pull/3049 FLINK-5395 [Build System] support locally build distribution by script create_release_files.sh 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 [X] General The pull request references the related JIRA issue (" FLINK-5395 support locally build distribution by script create_release_files.sh") The pull request addresses only one issue Each commit in the PR has a meaningful commit message (including the JIRA id) [X] Documentation Documentation has been added for new functionality Old documentation affected by the pull request has been updated JavaDoc for public methods has been added [X] Tests & Build Functionality added by the pull request is covered by tests `mvn clean verify` has been executed successfully locally or a Travis build has passed You can merge this pull request into a Git repository by running: $ git pull https://github.com/shijinkui/flink FLINK-5395 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3049.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3049 commit 3b41c0942ef7ddd5921a32afbee2133392a594b7 Author: shijinkui <shijinkui@huawei.com> Date: 2016-12-27T15:51:10Z FLINK-5395 [Build System] support locally build distribution by script create_release_files.sh

            People

            • Assignee:
              shijinkui shijinkui
              Reporter:
              shijinkui shijinkui
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development