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

    https://github.com/apache/storm/pull/294#discussion_r22775294
  
    --- Diff: storm-core/src/saveVersion.sh ---
    @@ -0,0 +1,42 @@
    +#this file is used to generate the package-info.java class that
    +# records the version, revision, branch, user, timestamp, and url
    +unset LANG
    +unset LC_CTYPE
    +unset LC_TIME
    +version=$1
    +build_dir=$2
    +user=`whoami`
    +date=`date`
    +cwd=`pwd`
    +if [ -d ../.git ]; then
    +  revision=`git log -1 --pretty=format:"%H"`
    +  hostname=`hostname`
    +  branch=`git branch | sed -n -e 's/^* //p'`
    +  url=`git remote -v | sed -n -e 's/^origin\t\(.*\)(fetch)/\1/p'`
    +elif [ -d .svn ]; then
    +  revision=`svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
    +  url=`svn info | sed -n -e 's/^URL: \(.*\)/\1/p'`
    +  # Get canonical branch (branches/X, tags/X, or trunk)
    +  branch=`echo $url | sed -n -e 's,.*\(branches/.*\)$,\1,p' \
    +                             -e 's,.*\(tags/.*\)$,\1,p' \
    +                             -e 's,.*trunk$,trunk,p'`
    +else
    +  revision="Unknown"
    +  branch="Unknown"
    +  url="file://$cwd"
    +fi
    +srcChecksum=`find src -name '*.java' | LC_ALL=C sort | xargs md5sum | 
md5sum | cut -d ' ' -f 1`
    --- End diff --
    
    Filed a follow up JIRA:
    https://issues.apache.org/jira/browse/STORM-622


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