File: makesetup

package info (click to toggle)
python-pyghmi 1.5.70-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 1,292 kB
  • sloc: python: 19,961; sh: 29; makefile: 18
file content (10 lines) | stat: -rwxr-xr-x 292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#!/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