40c546400e
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
11 lines
292 B
Bash
Executable File
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
|
|
|