]>
git.proxmox.com Git - ceph.git/blob - ceph/make-dist
4 echo "no .git present. run this from the base dir of the git checkout."
9 [ -z "$version" ] && version
=`git describe --match 'v*' | sed 's/^v//'`
10 outfile
="ceph-$version"
12 echo "version $version"
15 echo "updating submodules..."
16 force
=$
(if git submodule usage
2>&1 |
grep --quiet 'update.*--force'; then echo --force ; fi)
17 if ! git submodule sync ||
! git submodule update
$force --init --recursive; then
18 echo "Error: could not initialize submodule projects"
19 echo " Network connectivity might be required."
23 # clean out old cruft...
28 echo "building tarball..."
29 bin
/git-archive-all.sh
--prefix ceph-
$version/ \
34 # populate files with version strings
35 echo "including src/.git_version, ceph.spec"
37 (git rev-parse HEAD
; git describe
) 2> /dev
/null
> src
/.git_version
39 # if the version has '-' in it, it has a 'release' part,
40 # like vX.Y.Z-N-g<shortsha1>. If it doesn't, it's just
41 # vX.Y.Z. Handle both, and translate - to . for rpm
42 # naming rules (the - separates version and release).
44 if expr index
$version '-' > /dev
/null
; then
45 rpm_version
=`echo $version | cut -d - -f 1-1`
46 rpm_release
=`echo $version | cut -d - -f 2- | sed 's/-/./'`
53 for spec
in ceph.spec.
in alpine
/APKBUILD.
in; do
55 sed "s/@VERSION@/$rpm_version/g" |
56 sed "s/@RPM_RELEASE@/$rpm_release/g" |
57 sed "s/@TARBALL_BASENAME@/ceph-$version/g" > `echo $spec | sed 's/.in$//'`
60 tar cvf
$outfile.version.
tar $outfile/src
/.git_version
$outfile/ceph.spec
$outfile/alpine
/APKBUILD
61 tar --concatenate -f $outfile.both.
tar $outfile.version.
tar
62 tar --concatenate -f $outfile.both.
tar $outfile.
tar
63 mv $outfile.both.
tar $outfile.
tar
65 rm -f $outfile.version.
tar