2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-21 17:11:58 +00:00
confluent/imgutil/buildrpm

18 lines
602 B
Plaintext
Raw Permalink Normal View History

2021-06-14 20:12:01 +00:00
#!/bin/bash
VERSION=`git describe|cut -d- -f 1`
NUMCOMMITS=`git describe|cut -d- -f 2`
if [ "$NUMCOMMITS" != "$VERSION" ]; then
LASTNUM=$(echo $VERSION|rev|cut -d . -f 1|rev)
LASTNUM=$((LASTNUM+1))
FIRSTPART=$(echo $VERSION|rev|cut -d . -f 2- |rev)
VERSION=${FIRSTPART}.${LASTNUM}
VERSION=$VERSION~dev$NUMCOMMITS+`git describe|cut -d- -f 3`
2021-06-14 20:12:01 +00:00
fi
2021-06-14 20:14:13 +00:00
sed -e "s/#VERSION#/$VERSION/" confluent_imgutil.spec.tmpl > confluent_imgutil.spec
2022-04-26 12:18:31 +00:00
cp ../LICENSE .
2021-06-14 20:12:01 +00:00
cd ..
tar Jcvf confluent_imgutil.tar.xz imgutil
mv confluent_imgutil.tar.xz ~/rpmbuild/SOURCES/
cd -
rpmbuild -ba confluent_imgutil.spec