mirror of
https://opendev.org/x/pyghmi
synced 2025-01-12 18:58:34 +00:00
11 lines
292 B
Plaintext
11 lines
292 B
Plaintext
|
#!/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
|
||
|
|