Modify build for snap versions
Snapshots need to be treated special by various distributions Change-Id: I158cb713548920c5a45790bce00c97f2e00a8f32
This commit is contained in:
parent
72c90d65e1
commit
74b2e6da48
5
builddeb
5
builddeb
@ -11,7 +11,10 @@ if grep wheezy /etc/os-release; then
|
||||
export DSCARGS=""
|
||||
fi
|
||||
# If not PBR, use the setup.py.tmpl
|
||||
$PYEXEC -c 'import pbr' || ./makesetup
|
||||
sed -e 's/~/./' ./makesetup > ./makesetup.deb
|
||||
chmod +x ./makesetup.deb
|
||||
./makesetup.deb
|
||||
#$PYEXEC -c 'import pbr' || ./makesetup
|
||||
VERSION=`$PYEXEC setup.py --version`
|
||||
$PYEXEC setup.py sdist
|
||||
py2dsc $DSCARGS dist/pyghmi-$VERSION.tar.gz
|
||||
|
@ -3,7 +3,11 @@ 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`
|
||||
LASTNUM=$(echo $VERSION|rev|cut -d . -f 1|rev)
|
||||
LASTNUM=$((LASTNUM+1))
|
||||
FIRSTPART=$(echo $VERSION|rev|cut -d . -f 2- |rev)
|
||||
VERSION=${FIRSTPART}.${LASTNUM}
|
||||
VERSION=$VERSION~dev$NUMCOMMITS+`git describe|cut -d- -f 3`
|
||||
fi
|
||||
echo $VERSION > VERSION
|
||||
sed -e "s/#VERSION#/$VERSION/" setup.py.tmpl > setup.py
|
||||
|
Loading…
Reference in New Issue
Block a user