pyghmi/makesetup
Jarrod Johnson 40c546400e Enable package builds without pbr
There are some build environments we are being asked
to support that pbr does not.  A quick fallback
to handle such environments.

Change-Id: Ie5dac2555c73e80e4cf589932a18f31a530bdf65
2019-02-04 15:59:18 -05: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