Browse Source

modified: release.sh

modified:   setup.py
	modified:   tox
main
root 12 years ago
parent
commit
b591dfcc8b
3 changed files with 24 additions and 18 deletions
  1. +7
    -13
      release.sh
  2. +2
    -2
      setup.py
  3. +15
    -3
      tox

+ 7
- 13
release.sh View File

@@ -1,28 +1,23 @@
#!/bin/bash
set -e
set -ex

VERSION=$(python -c "from src.wstools.version import __version__ ; print __version__")
echo Preparing to release version $VERSION

pip install -q --upgrade pep8 autopep8
#pip install -q --upgrade autopep8

#source tox

#pip install --upgrade pep8 autopep8 docutils

echo === Testings ===
if ! python setup.py test; then
echo "The test suite failed. Fix it!"
exit 1
fi

echo === Chechink that all changes are commited and pushed ===
git pull -u

python setup.py check --restructuredtext --strict

autopep8 -i -r src/*.py

# commented some errors temporarly, TODO: remove them and fix the code
pep8 --max-line-length=180 --ignore=E502,E128,E123,E127,E125 src

sleep 1

git diff
# Disallow unstaged changes in the working tree
if ! git diff-files --check --exit-code --ignore-submodules -- >&2
@@ -40,7 +35,6 @@ git diff
fi



echo "Please don't run this as a user. This generates a new release for PyPI. Press ^C to exit or Enter to continue."
read



+ 2
- 2
setup.py View File

@@ -29,6 +29,6 @@ setup(
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
install_requires=[],
tests_require=['virtualenv>=1.8.4','pytest'],
install_requires=['docutils'],
tests_require=['virtualenv>=1.8.4', 'pytest'],
)

+ 15
- 3
tox View File

@@ -12,7 +12,6 @@ else
fi
fi


if [ -z "$VIRTUAL_ENV" ]
then
virtualenv .tox/tox
@@ -27,8 +26,21 @@ then
exit 1
fi

pip install tox --upgrade -v
easy_install "tox>=1.3"
#pip install tox --upgrade -v
# pytest pytest-cov

tox -v
python setup.py check --restructuredtext --strict

autopep8 -i -r src/*.py

# commented some errors temporarly, TODO: remove them and fix the code
pep8 --max-line-length=180 --ignore=E502,E128,E123,E127,E125 src

tox -v $@

if [ $? -ne 0 ]; then
echo "Error: tox returned error code $?"
else
echo "Done."
fi

Loading…
Cancel
Save