[SPARK-2233] make-distribution script should list the git hash in the RELEASE file
[SPARK-2233] make-distribution script should list the git hash in the RELEASE file

This patch adds the git revision hash (short version) to the RELEASE file. It uses git instead of simply checking for the existence of .git, so as to make sure that this is a functional repository.

Author: Guillaume Ballet <gballet@gmail.com>

Closes #1216 from gballet/master and squashes the following commits:

eabc50f [Guillaume Ballet] Refactored the script to take comments into account.
d93e5e8 [Guillaume Ballet] [SPARK 2233] make-distribution script now lists the git hash tag in the RELEASE file.

holdenk/spark,eyalfa/spark,eyalfa/spark,mike0sv/spark,map222/spark,yanboliang/spark,srowen/spark,dongjoon-hyun/spark,UndeadBaneGitHub/spark,michalsenkyr/spark,alunarbeach/spark,saltstar/spark,liyichao/spark,gengliangwang/spark,sureshthalamati/spark,mdespriee/spark,andrewor14/iolap,srowen/spark,jiangxb1987/spark,bdrillard/spark,akopich/spark,zero323/spark,facaiy/spark,shuangshuangwang/spark,jianran/spark,ahnqirage/spark,ConeyLiu/spark,WeichenXu123/spark,1haodian/spark,liyichao/spark,mahak/spark,mdespriee/spark,mdespriee/spark,lxsmnv/spark,big-pegasus/spark,BryanCutler/spark,poffuomo/spark,xuanyuanking/spark,ioana-delaney/spark,1haodian/spark,bOOm-X/spark,kissmetrics/spark,markhamstra/spark,sahilTakiar/spark,nchammas/spark,milliman/spark,kiszk/spark,ptkool/spark,tejasapatil/spark,wangyum/spark,wzhfy/spark,hhbyyh/spark,nilsgrabbert/spark,setjet/spark,metamx/spark,ioana-delaney/spark,hvanhovell/spark,JerryLead/spark,MLnick/spark,byakuinss/spark,kiszk/spark,ahnqirage/spark,big-pegasus/spark,rezasafi/spark,goldmedal/spark,chuckchen/spark,cloud-fan/spark,shubhamchopra/spark,saturday-shi/spark,yanboliang/spark,jiangxb1987/spark,jianran/spark,debugger87/spark,witgo/spark,cin/spark,facaiy/spark,maropu/spark,szhem/spark,kimoonkim/spark,caneGuy/spark,pronix/spark,byakuinss/spark,caneGuy/spark,cloud-fan/spark,taroplus/spark,actuaryzhang/spark,kissmetrics/spark,WeichenXu123/spark,ericvandenbergfb/spark,WeichenXu123/spark,andrewor14/spark,aosagie/spark,narahari92/spark,kiszk/spark,szhem/spark,ajaysaini725/spark,ioana-delaney/spark,Panos-Bletsos/spark-cost-model-optimizer,maropu/spark,maropu/spark,aokolnychyi/spark,rekhajoshm/spark,zzcclp/spark,kiszk/spark,jianran/spark,techaddict/spark,shubhamchopra/spark,liutang123/spark,vinodkc/spark,ahnqirage/spark,patrick-nicholson/spark,rednaxelafx/apache-spark,ptkool/spark,mzl9039/spark,rezasafi/spark,panfengfeng/spark,highfei2011/spark,eyalfa/spark,MLnick/spark,tengpeng/spark,liutang123/spark,chuckchen/spark,ajaysaini725/spark,aokolnychyi/spark,setjet/spark,bOOm-X/spark,SHASHANKB/spark,eyalfa/spark,ericvandenbergfb/spark,jiangxb1987/spark,MLnick/spark,sachintyagi22/spark,sureshthalamati/spark,nlalevee/spark,shaneknapp/spark,michalsenkyr/spark,hvanhovell/spark,JerryLead/spark,matthewfranglen/spark,maropu/spark,ericvandenbergfb/spark,someorz/spark,jiangxb1987/spark,shaneknapp/spark,janewangfb/spark,andrewor14/spark,metamx/spark,BryanCutler/spark,joseph-torres/spark,dhruve/spark,mzl9039/spark,brad-kaiser/spark,HyukjinKwon/spark,metamx/spark,caneGuy/spark,MLnick/spark,ueshin/apache-spark,aosagie/spark,techaddict/spark,JerryLead/spark,apache/spark,zhouyejoe/spark,jlopezmalla/spark,mike0sv/spark,adrian-ionescu/apache-spark,holdenk/spark,ibm-research-ireland/sparkoscope,gengliangwang/spark,mahak/spark,mike0sv/spark,saturday-shi/spark,SnappyDataInc/spark,yanboliang/spark,byakuinss/spark,sahilTakiar/spark,brad-kaiser/spark,Panos-Bletsos/spark-cost-model-optimizer,SHASHANKB/spark,lvdongr/spark,Panos-Bletsos/spark-cost-model-optimizer,mzl9039/spark,rednaxelafx/apache-spark,stanzhai/spark,setjet/spark,brad-kaiser/spark,kevinyu98/spark,spark-test/spark,wangyum/spark,sureshthalamati/spark,pronix/spark,jkbradley/spark,jiangxb1987/spark,jlopezmalla/spark,sahilTakiar/spark,jrshust/spark,debugger87/spark,ConeyLiu/spark,metamx/spark,facaiy/spark,yanboliang/spark,cin/spark,wangmiao1981/spark,vinodkc/spark,SnappyDataInc/spark,apache-spark-on-k8s/spark,witgo/spark,map222/spark,taroplus/spark,darionyaphet/spark,apache/spark,HyukjinKwon/spark,huang1900/spark,jianran/spark,skonto/spark,wangyum/spark,bdrillard/spark,dbtsai/spark,kiszk/spark,bOOm-X/spark,jiangxb1987/spark,aokolnychyi/spark,big-pegasus/spark,spark-test/spark,kiszk/spark,bOOm-X/spark,aray/spark,adrian-ionescu/apache-spark,ueshin/apache-spark,brad-kaiser/spark,sahilTakiar/spark,facaiy/spark,milliman/spark,srowen/spark,witgo/spark,zzcclp/spark,zzcclp/spark,alunarbeach/spark,ptkool/spark,narahari92/spark,ioana-delaney/spark,JoshRosen/spark,darionyaphet/spark,huang1900/spark,sachintyagi22/spark,markhamstra/spark,skonto/spark,vinodkc/spark,wangmiao1981/spark,SnappyDataInc/spark,rekhajoshm/spark,markhamstra/spark,tengpeng/spark,bdrillard/spark,esi-mineset/spark,andrewor14/spark,rikima/spark,joseph-torres/spark,ron8hu/spark,minixalpha/spark,setjet/spark,srowen/spark,andrewor14/iolap,stanzhai/spark,guoxiaolongzte/spark,WindCanDie/spark,rezasafi/spark,lvdongr/spark,saltstar/spark,bravo-zhang/spark,sachintyagi22/spark,dhruve/spark,map222/spark,MLnick/spark,bravo-zhang/spark,SHASHANKB/spark,goldmedal/spark,nchammas/spark,tengpeng/spark,esi-mineset/spark,saturday-shi/spark,shubhamchopra/spark,debugger87/spark,big-pegasus/spark,ConeyLiu/spark,Panos-Bletsos/spark-cost-model-optimizer,alunarbeach/spark,aosagie/spark,cin/spark,xuanyuanking/spark,gengliangwang/spark,actuaryzhang/spark,kimoonkim/spark,xflin/spark,hvanhovell/spark,wzhfy/spark,bOOm-X/spark,dbtsai/spark,skonto/spark,dongjoon-hyun/spark,markhamstra/spark,rezasafi/spark,LantaoJin/spark,liutang123/spark,jkbradley/spark,MLnick/spark,someorz/spark,rekhajoshm/spark,alunarbeach/spark,andrewor14/spark,HyukjinKwon/spark,SHASHANKB/spark,bravo-zhang/spark,guoxiaolongzte/spark,JerryLead/spark,someorz/spark,bravo-zhang/spark,janewangfb/spark,ddna1021/spark,shaneknapp/spark,lvdongr/spark,rikima/spark,xflin/spark,byakuinss/spark,xflin/spark,Aegeaner/spark,ptkool/spark,kevinyu98/spark,aokolnychyi/spark,shaneknapp/spark,guoxiaolongzte/spark,milliman/spark,dhruve/spark,chuckchen/spark,stanzhai/spark,ajaysaini725/spark,icexelloss/spark,hhbyyh/spark,patrick-nicholson/spark,sachintyagi22/spark,kevinyu98/spark,lxsmnv/spark,tejasapatil/spark,stanzhai/spark,ddna1021/spark,jlopezmalla/spark,ConeyLiu/spark,mdespriee/spark,narahari92/spark,adrian-ionescu/apache-spark,shaneknapp/spark,debugger87/spark,guoxiaolongzte/spark,SHASHANKB/spark,sureshthalamati/spark,xflin/spark,actuaryzhang/spark,mahak/spark,highfei2011/spark,lxsmnv/spark,skonto/spark,wzhfy/spark,bdrillard/spark,Aegeaner/spark,actuaryzhang/spark,icexelloss/spark,pgandhi999/spark,chuckchen/spark,kissmetrics/spark,hvanhovell/spark,holdenk/spark,minixalpha/spark,goldmedal/spark,kevinyu98/spark,poffuomo/spark,publicRoman/spark,nlalevee/spark,shuangshuangwang/spark,WindCanDie/spark,andrewor14/spark,Panos-Bletsos/spark-cost-model-optimizer,zero323/spark,lxsmnv/spark,aosagie/spark,goldmedal/spark,actuaryzhang/spark,brad-kaiser/spark,alunarbeach/spark,esi-mineset/spark,michalsenkyr/spark,markhamstra/spark,highfei2011/spark,goldmedal/spark,andrewor14/iolap,cloud-fan/spark,panfengfeng/spark,ueshin/apache-spark,byakuinss/spark,BryanCutler/spark,patrick-nicholson/spark,jkbradley/spark,big-pegasus/spark,xuanyuanking/spark,tejasapatil/spark,darionyaphet/spark,shuangshuangwang/spark,ericvandenbergfb/spark,minixalpha/spark,BryanCutler/spark,wzhfy/spark,JoshRosen/spark,cin/spark,holdenk/spark,cin/spark,joseph-torres/spark,jkbradley/spark,Panos-Bletsos/spark-cost-model-optimizer,janewangfb/spark,kevinyu98/spark,milliman/spark,skonto/spark,UndeadBaneGitHub/spark,ptkool/spark,milliman/spark,liyichao/spark,adrian-ionescu/apache-spark,rikima/spark,cin/spark,liyichao/spark,liyichao/spark,kissmetrics/spark,liutang123/spark,szhem/spark,WeichenXu123/spark,Aegeaner/spark,gioenn/xSpark,holdenk/spark,WeichenXu123/spark,ericvandenbergfb/spark,lxsmnv/spark,andrewor14/iolap,icexelloss/spark,janewangfb/spark,shuangshuangwang/spark,mzl9039/spark,andrewor14/iolap,hvanhovell/spark,apache/spark,ajaysaini725/spark,szhem/spark,witgo/spark,guoxiaolongzte/spark,loneknightpy/spark,ahnqirage/spark,dhruve/spark,kimoonkim/spark,debugger87/spark,skonto/spark,ptkool/spark,nlalevee/spark,1haodian/spark,apache/spark,sahilTakiar/spark,JerryLead/spark,mzl9039/spark,gengliangwang/spark,janewangfb/spark,michalsenkyr/spark,techaddict/spark,jkbradley/spark,panfengfeng/spark,ron8hu/spark,srowen/spark,dongjoon-hyun/spark,xuanyuanking/spark,WeichenXu123/spark,dongjoon-hyun/spark,patrick-nicholson/spark,liutang123/spark,ahnqirage/spark,haowu80s/spark,tengpeng/spark,kevinyu98/spark,gengliangwang/spark,bdrillard/spark,techaddict/spark,michalsenkyr/spark,panfengfeng/spark,narahari92/spark,haowu80s/spark,ahnqirage/spark,ibm-research-ireland/sparkoscope,hhbyyh/spark,wzhfy/spark,panfengfeng/spark,kissmetrics/spark,techaddict/spark,BryanCutler/spark,nilsgrabbert/spark,loneknightpy/spark,map222/spark,tejasapatil/spark,publicRoman/spark,publicRoman/spark,JoshRosen/spark,bravo-zhang/spark,andrewor14/iolap,kissmetrics/spark,aray/spark,caneGuy/spark,yanboliang/spark,joseph-torres/spark,highfei2011/spark,hvanhovell/spark,icexelloss/spark,ibm-research-ireland/sparkoscope,sachintyagi22/spark,caneGuy/spark,ConeyLiu/spark,maropu/spark,yanboliang/spark,chuckchen/spark,esi-mineset/spark,techaddict/spark,publicRoman/spark,pgandhi999/spark,witgo/spark,saturday-shi/spark,UndeadBaneGitHub/spark,mike0sv/spark,zuotingbing/spark,caneGuy/spark,aokolnychyi/spark,loneknightpy/spark,minixalpha/spark,stanzhai/spark,poffuomo/spark,SHASHANKB/spark,rekhajoshm/spark,xuanyuanking/spark,shubhamchopra/spark,apache/spark,UndeadBaneGitHub/spark,cloud-fan/spark,akopich/spark,nilsgrabbert/spark,witgo/spark,LantaoJin/spark,witgo/spark,LantaoJin/spark,WindCanDie/spark,eyalfa/spark,huang1900/spark,LantaoJin/spark,vinodkc/spark,aokolnychyi/spark,big-pegasus/spark,ajaysaini725/spark,jrshust/spark,spark-test/spark,jrshust/spark,janewangfb/spark,techaddict/spark,taroplus/spark,jrshust/spark,facaiy/spark,sureshthalamati/spark,bdrillard/spark,darionyaphet/spark,bravo-zhang/spark,akopich/spark,wangmiao1981/spark,aosagie/spark,mike0sv/spark,vinodkc/spark,poffuomo/spark,kimoonkim/spark,pronix/spark,HyukjinKwon/spark,BryanCutler/spark,srowen/spark,nchammas/spark,big-pegasus/spark,szhem/spark,wangyum/spark,rezasafi/spark,mike0sv/spark,gengliangwang/spark,SHASHANKB/spark,haowu80s/spark,LantaoJin/spark,map222/spark,jkbradley/spark,esi-mineset/spark,hhbyyh/spark,huang1900/spark,lvdongr/spark,haowu80s/spark,shaneknapp/spark,WindCanDie/spark,zero323/spark,pgandhi999/spark,wangyum/spark,saltstar/spark,nlalevee/spark,map222/spark,tejasapatil/spark,poffuomo/spark,xuanyuanking/spark,szhem/spark,mdespriee/spark,nlalevee/spark,esi-mineset/spark,ajaysaini725/spark,ibm-research-ireland/sparkoscope,wzhfy/spark,sahilTakiar/spark,taroplus/spark,rednaxelafx/apache-spark,milliman/spark,ajaysaini725/spark,dongjoon-hyun/spark,highfei2011/spark,darionyaphet/spark,akopich/spark,tejasapatil/spark,sahilTakiar/spark,loneknightpy/spark,liutang123/spark,shuangshuangwang/spark,byakuinss/spark,LantaoJin/spark,ConeyLiu/spark,apache-spark-on-k8s/spark,setjet/spark,facaiy/spark,taroplus/spark,debugger87/spark,Aegeaner/spark,zuotingbing/spark,joseph-torres/spark,aokolnychyi/spark,JerryLead/spark,spark-test/spark,ddna1021/spark,apache-spark-on-k8s/spark,kissmetrics/spark,panfengfeng/spark,joseph-torres/spark,jrshust/spark,taroplus/spark,sachintyagi22/spark,saturday-shi/spark,WindCanDie/spark,ConeyLiu/spark,someorz/spark,shuangshuangwang/spark,maropu/spark,poffuomo/spark,pgandhi999/spark,huang1900/spark,icexelloss/spark,brad-kaiser/spark,dbtsai/spark,lvdongr/spark,nilsgrabbert/spark,zero323/spark,SnappyDataInc/spark,mzl9039/spark,zuotingbing/spark,liyichao/spark,darionyaphet/spark,stanzhai/spark,rikima/spark,rednaxelafx/apache-spark,akopich/spark,setjet/spark,saltstar/spark,ioana-delaney/spark,shaneknapp/spark,panfengfeng/spark,jlopezmalla/spark,minixalpha/spark,zzcclp/spark,cloud-fan/spark,ron8hu/spark,MLnick/spark,nchammas/spark,zuotingbing/spark,adrian-ionescu/apache-spark,hhbyyh/spark,dbtsai/spark,lxsmnv/spark,tengpeng/spark,nchammas/spark,hhbyyh/spark,JoshRosen/spark,zhouyejoe/spark,alunarbeach/spark,esi-mineset/spark,apache/spark,apache-spark-on-k8s/spark,SnappyDataInc/spark,ron8hu/spark,haowu80s/spark,tengpeng/spark,zhouyejoe/spark,pgandhi999/spark,pronix/spark,pgandhi999/spark,jianran/spark,ddna1021/spark,zzcclp/spark,BryanCutler/spark,debugger87/spark,pgandhi999/spark,dongjoon-hyun/spark,JerryLead/spark,rekhajoshm/spark,loneknightpy/spark,patrick-nicholson/spark,ueshin/apache-spark,ioana-delaney/spark,ibm-research-ireland/sparkoscope,huang1900/spark,loneknightpy/spark,rekhajoshm/spark,xuanyuanking/spark,wangyum/spark,ron8hu/spark,zhouyejoe/spark,zzcclp/spark,ueshin/apache-spark,sachintyagi22/spark,someorz/spark,rednaxelafx/apache-spark,ueshin/apache-spark,cloud-fan/spark,wangyum/spark,icexelloss/spark,joseph-torres/spark,huang1900/spark,apache-spark-on-k8s/spark,aosagie/spark,saltstar/spark,goldmedal/spark,andrewor14/spark,jlopezmalla/spark,poffuomo/spark,lxsmnv/spark,ericvandenbergfb/spark,1haodian/spark,bOOm-X/spark,UndeadBaneGitHub/spark,alunarbeach/spark,JoshRosen/spark,rikima/spark,Aegeaner/spark,andrewor14/spark,pronix/spark,szhem/spark,apache/spark,liutang123/spark,gioenn/xSpark,ericvandenbergfb/spark,stanzhai/spark,SnappyDataInc/spark,dbtsai/spark,WindCanDie/spark,gioenn/xSpark,zhouyejoe/spark,mahak/spark,actuaryzhang/spark,gioenn/xSpark,ddna1021/spark,patrick-nicholson/spark,mahak/spark,zzcclp/spark,srowen/spark,apache-spark-on-k8s/spark,wangmiao1981/spark,bravo-zhang/spark,chuckchen/spark,setjet/spark,dbtsai/spark,skonto/spark,someorz/spark,rednaxelafx/apache-spark,jlopezmalla/spark,ron8hu/spark,holdenk/spark,taroplus/spark,adrian-ionescu/apache-spark,aray/spark,haowu80s/spark,jlopezmalla/spark,jiangxb1987/spark,dbtsai/spark,aray/spark,minixalpha/spark,mdespriee/spark,rezasafi/spark,eyalfa/spark,publicRoman/spark,yanboliang/spark,shuangshuangwang/spark,maropu/spark,rikima/spark,tengpeng/spark,1haodian/spark,zuotingbing/spark,akopich/spark,patrick-nicholson/spark,vinodkc/spark,aray/spark,mahak/spark,saturday-shi/spark,kimoonkim/spark,publicRoman/spark,nchammas/spark,zero323/spark,shubhamchopra/spark,chuckchen/spark,hhbyyh/spark,rednaxelafx/apache-spark,dongjoon-hyun/spark,zuotingbing/spark,ron8hu/spark,publicRoman/spark,HyukjinKwon/spark,nlalevee/spark,ddna1021/spark,actuaryzhang/spark,LantaoJin/spark,kimoonkim/spark,brad-kaiser/spark,wangmiao1981/spark,mike0sv/spark,bdrillard/spark,jrshust/spark,wzhfy/spark,apache-spark-on-k8s/spark,icexelloss/spark,xflin/spark,1haodian/spark,ddna1021/spark,nilsgrabbert/spark,xflin/spark,goldmedal/spark,sureshthalamati/spark,ueshin/apache-spark,ahnqirage/spark,andrewor14/iolap,nilsgrabbert/spark,narahari92/spark,kiszk/spark,wangmiao1981/spark,byakuinss/spark,JoshRosen/spark,liyichao/spark,loneknightpy/spark,zero323/spark,metamx/spark,dhruve/spark,jianran/spark,lvdongr/spark,minixalpha/spark,hvanhovell/spark,michalsenkyr/spark,highfei2011/spark,jkbradley/spark,kimoonkim/spark,nchammas/spark,mahak/spark,ibm-research-ireland/sparkoscope,rekhajoshm/spark,metamx/spark,adrian-ionescu/apache-spark,janewangfb/spark,gioenn/xSpark,spark-test/spark,cloud-fan/spark,metamx/spark,darionyaphet/spark,wangmiao1981/spark,vinodkc/spark,aray/spark,holdenk/spark,rezasafi/spark,someorz/spark,bOOm-X/spark,aray/spark,mdespriee/spark,kevinyu98/spark,zuotingbing/spark,eyalfa/spark,lvdongr/spark,dhruve/spark,mzl9039/spark,UndeadBaneGitHub/spark,zhouyejoe/spark,akopich/spark,gioenn/xSpark,rikima/spark,gioenn/xSpark,ibm-research-ireland/sparkoscope,guoxiaolongzte/spark,HyukjinKwon/spark,WindCanDie/spark,dhruve/spark,UndeadBaneGitHub/spark,jrshust/spark,michalsenkyr/spark,Panos-Bletsos/spark-cost-model-optimizer,markhamstra/spark,nilsgrabbert/spark,saturday-shi/spark,SnappyDataInc/spark,JoshRosen/spark,Aegeaner/spark,1haodian/spark,shubhamchopra/spark,nlalevee/spark,facaiy/spark,Aegeaner/spark,saltstar/spark,sureshthalamati/spark,aosagie/spark,tejasapatil/spark,highfei2011/spark,HyukjinKwon/spark,jianran/spark,markhamstra/spark,spark-test/spark,caneGuy/spark,saltstar/spark,cin/spark,spark-test/spark,pronix/spark,narahari92/spark,zhouyejoe/spark,ptkool/spark,zero323/spark,map222/spark,guoxiaolongzte/spark,WeichenXu123/spark,milliman/spark,gengliangwang/spark,xflin/spark,shubhamchopra/spark,ioana-delaney/spark,narahari92/spark