2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-26 10:57:54 +00:00
pyghmi/makesetup
Jarrod Johnson 3673666035 Update for modern Debian/Ubuntu build
Change-Id: Ia22d711512137fcaf30174b0e899d6ce7d937fec
2024-06-11 13:26:47 -04:00

11 lines
292 B
Bash
Executable File

#!/bin/sh
cd `dirname $0`
VERSION=`git describe|cut -d- -f 1`
NUMCOMMITS=`git describe|cut -d- -f 2`
if [ "$NUMCOMMITS" != "$VERSION" ]; then
VERSION=$VERSION.dev$NUMCOMMITS+g`git describe|cut -d- -f 3`
fi
echo $VERSION > VERSION
sed -e "s/#VERSION#/$VERSION/" setup.py.tmpl > setup.py