Skip to content

Commit 0db48b2

Browse files
committed
make-debs.sh: Optionally take debian version
Our existing CI builds have names like: ceph-base_20.0.0-194-g6efaea33-1jammy_amd64.deb Before this change, they are like: ceph-base_20.0.0-158-gb0de3a42-1_amd64.deb This way we can pass e.g. "jammy" to end up with names compatible with our CI builds. Signed-off-by: Zack Cerza <[email protected]>
1 parent 4cfdbcf commit 0db48b2

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

make-debs.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,18 @@ rm -fr $(dirname $releasedir)
3232
# c) compares higher than any previous commit
3333
# d) contains the short hash of the commit
3434
#
35-
vers=${2:-$(git describe --match "v*" | sed s/^v//)}
35+
# CI builds compute the version at an earlier stage, via the same method. Since
36+
# git metadata is not part of the source distribution, we take the version as
37+
# an argument to this script.
38+
#
39+
if [ -z "${2}" ]; then
40+
vers=$(git describe --match "v*" | sed s/^v//)
41+
dvers=${vers}-1
42+
else
43+
vers=${2}
44+
dvers=${vers}-1${VERSION_CODENAME}
45+
fi
46+
3647
test -f "ceph-$vers.tar.bz2" || ./make-dist $vers
3748
#
3849
# rename the tarbal to match debian conventions and extract it
@@ -48,12 +59,7 @@ cp -a debian $releasedir/ceph-$vers/debian
4859
cd $releasedir
4960
perl -ni -e 'print if(!(/^Package: .*-dbg$/../^$/))' ceph-$vers/debian/control
5061
perl -pi -e 's/--dbg-package.*//' ceph-$vers/debian/rules
51-
#
52-
# always set the debian version to 1 which is ok because the debian
53-
# directory is included in the sources and the upstream version will
54-
# change each time it is modified.
55-
#
56-
dvers="$vers-1"
62+
5763
#
5864
# update the changelog to match the desired version
5965
#

0 commit comments

Comments
 (0)