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
|
2024-09-04 14:11:47 +00:00
|
|
|
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 -
|
2021-06-14 20:12:43 +00:00
|
|
|
rpmbuild -ba confluent_imgutil.spec
|