[
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 <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.
> 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)