File tree Expand file tree Collapse file tree 1 file changed +8
-34
lines changed
Expand file tree Collapse file tree 1 file changed +8
-34
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # Generate a source tarball including submodules
4- if [ -z " ${1} " ] ; then
5- echo No tag or branch given
6- exit 1
7- fi
8- ver=${1}
9- # Remove initial v from tag name for use in filenames
10- if [ ${ver: 0: 1} = ' v' ] ; then
11- fver=${ver: 1}
12- else
13- fver=${ver}
14- fi
15- if [ -r xrootd-${fver} .tar.gz ] ; then
16- echo xrootd-${fver} .tar.gz already exists
17- exit 1
18- fi
19- curdir=$( pwd)
20- tdir=$( mktemp -d)
21- cd ${tdir}
22- git clone https://github.com/xrootd/xrootd.git
23- cd xrootd
24- git checkout ${ver}
25- if [ $? -ne 0 ] ; then
26- echo No such tag or branch: ${ver}
27- cd ${curdir}
28- rm -rf ${tdir}
29- exit 1
30- fi
31- git archive --prefix xrootd-${fver} / ${ver} -o ${tdir} /xrootd-${fver} .tar
32- cd ${tdir}
33- gzip xrootd-${fver} .tar
34- mv xrootd-${fver} .tar.gz ${curdir}
35- cd ${curdir}
36- rm -rf ${tdir}
3+ set -e
4+
5+ TAG=$( printf " %s" " $( git describe " ${1:- HEAD} " ) " )
6+ NAME=" xrootd-${TAG# v} "
7+
8+ set -x
9+
10+ git archive -9 --prefix=" ${NAME} /" -o " ${NAME} .tar.gz" ${TAG}
3711
You can’t perform that action at this time.
0 commit comments