Files
packstack/bin/release.sh
Francesco Vollero db71879e94 [Enhancement] Added --version flag
Change-Id: I4f90673ce4855ada405c4e93c9f4c2c08707e6fe
Fix: bz#1011691
2014-01-23 16:18:36 +01:00

20 lines
510 B
Bash
Executable File

#!/usr/bin/env bash
#
git reset --hard
git submodule sync
git submodule update --init
git status -s | grep "." && ( echo "Contains unknown files" ; exit 1 )
if [ "$1" = "release" ] ; then
sed -i -e 's/FINAL=False/FINAL=True/g' packstack/version.py
SNAPTAG=""
else
SNAPTAG=$(git log --oneline | wc -l)
sed -i -e "s/SNAPTAG=None/SNAPTAG=${SNAPTAG}/g" packstack/version.py
fi
python setup.py setopt -o tag_build -s "$SNAPTAG" -c egg_info
python setup.py sdist
git checkout packstack/version.py