Skip to content

Commit

Permalink
Added release to setup.py
Browse files Browse the repository at this point in the history
Linting fixes.
  • Loading branch information
sys-git committed Oct 29, 2017
1 parent 85d3d44 commit c1497df
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 59 deletions.
2 changes: 0 additions & 2 deletions certifiable/complex.py
Expand Up @@ -17,8 +17,6 @@
'certify_tuple',
'certify_list',
'certify_email',
'certify_json',
'certify_html',
'certify_dict_schema',
'certify_iterable_schema',
]
Expand Down
2 changes: 1 addition & 1 deletion certifiable/utils.py
Expand Up @@ -208,7 +208,7 @@ def enable_from_env(state=None):
state,
)
value = bool(int(x))
except Exception as e:
except Exception:
value = bool(state)

return enable(value)
Expand Down
16 changes: 15 additions & 1 deletion setup.py
Expand Up @@ -13,6 +13,7 @@
"""The setup script."""

import os
import sys

from setuptools import find_packages, setup

Expand Down Expand Up @@ -41,9 +42,22 @@

about = {}
with open(os.path.join(here, 'certifiable', '__version__.py')) as f:
exec(f.read(), about)
exec (f.read(), about)
version = about['__version__']

# 'setup.py publish' shortcut.
if sys.argv[-1] == 'publish':
version = about['__version__']
print("Tagging release as: {v}".format(v=version))
os.system("git tag -a {v} -m 'version {v}'".format(v=version))
os.system('git push --tags')
os.system('python setup.py sdist bdist_wheel')
os.system('twine upload dist/*')
sys.exit()
elif sys.argv[-1] == 'test':
os.system('make test')
sys.exit()

setup(
name='certifiable',
version=about['__version__'],
Expand Down
55 changes: 0 additions & 55 deletions tests/unit/complex/test_certify_html.py

This file was deleted.

0 comments on commit c1497df

Please sign in to comment.