-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from hotzenklotz/auto-release
Automated Releases
- Loading branch information
Showing
4 changed files
with
189 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ name = "pypi" | |
|
||
[packages] | ||
pytest = "==3.8.1" | ||
twine = "*" | ||
|
||
[dev-packages] | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,33 @@ | ||
from setuptools import setup | ||
from setuptools.command.test import test as TestCommand | ||
from setuptools.command.install import install | ||
import sys | ||
import os | ||
|
||
import pybeerxml | ||
|
||
# circleci.py version | ||
VERSION = "1.0.3" | ||
|
||
def readme(): | ||
"""print long description""" | ||
with open('README.md') as f: | ||
return f.read() | ||
|
||
|
||
class VerifyVersionCommand(install): | ||
"""Custom command to verify that the git tag matches our version""" | ||
description = 'verify that the git tag matches our version' | ||
|
||
def run(self): | ||
tag = os.getenv('CIRCLE_TAG') | ||
|
||
if tag != VERSION: | ||
info = "Git tag: {0} does not match the version of this app: {1}".format( | ||
tag, VERSION | ||
) | ||
sys.exit(info) | ||
|
||
class PyTest(TestCommand): | ||
def finalize_options(self): | ||
TestCommand.finalize_options(self) | ||
|
@@ -18,14 +42,17 @@ def run_tests(self): | |
setup( | ||
name = 'pybeerxml', | ||
packages = ['pybeerxml'], | ||
version = '1.0.2', | ||
version = VERSION, | ||
description = 'A BeerXML Parser', | ||
author = 'Tom Herold', | ||
author_email = '[email protected]', | ||
url = 'https://github.com/hotzenklotz/pybeerxml', | ||
download_url = 'https://github.com/hotzenklotz/pybeerxml/tarball/1.0.2', | ||
download_url = 'https://github.com/hotzenklotz/pybeerxml/tarball/{}'.format(VERSION), | ||
tests_require=['pytest'], | ||
cmdclass={'test': PyTest}, | ||
cmdclass={ | ||
'test': PyTest, | ||
'verify': VerifyVersionCommand | ||
}, | ||
platforms='any', | ||
keywords = ['beerxml', 'beer', 'xml', 'brewing'], | ||
classifiers = [], | ||
|