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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to