Skip to content

Commit

Permalink
Merge pull request #28 from sarugaku/release-update
Browse files Browse the repository at this point in the history
Update release scripts
  • Loading branch information
techalchemy authored Jul 11, 2018
2 parents a7ee9e5 + cbe65b2 commit 3985ae3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ include README.rst
include LICENSE
include HISTORY.txt
include CHANGELOG.rst
recursive-include src/requirementslib/_vendor/ *LICENSE*
recursive-include src/requirementslib/_vendor/ *LICENSE* LICENSE.*
recursive-include src *LICENSE* *COPYING*
recursive-include docs Makefile *.rst *.py *.bat
include pyproject.toml
include src/requirementslib/_vendor/requirements.txt
include src/requirementslib/_vendor/pipfile/LICENSE*
include src/requirementslib/_vendor/pipfile/LICENSE* LICENSE.*
exclude .travis.yml
exclude appveyor.yml
prune .github
Expand Down
1 change: 1 addition & 0 deletions news/28.trivial
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated release scripts and tooling.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def finalize_options(self):
def run(self):
# self.status('Building Source distribution…')
# os.system('{0} setup.py sdist'.format(sys.executable))
self.status('Uploading the package to PyPi via Twine')
self.status('Uploading the package to PyPi via Twine...')
os.system('twine upload dist/*')
self.status('Pushing git tags…')
os.system('git tag v{0}'.format(find_version("src", "requirementslib", "__init__.py")))
Expand Down Expand Up @@ -108,6 +108,7 @@ def run(self):
),
package_data={
'': ['LICENSE'],
"src._vendor.pipfile": ["LICENSE.*"],
},
entry_points={},
tests_require=tests_require,
Expand Down
2 changes: 1 addition & 1 deletion src/requirementslib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding=utf-8 -*-
__version__ = "1.0.9"
__version__ = "1.0.10.dev0"


from .exceptions import RequirementError
Expand Down
9 changes: 5 additions & 4 deletions tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ def tag_version(ctx, push=False):
def bump_version(ctx, dry_run=False, major=False, minor=False, micro=True, dev=False, pre=False, tag=None, clear=False, commit=False,):
_current_version = get_version(ctx)
current_version = Version.parse(_current_version)
if pre and not tag:
new_version = current_version
if pre and not tag and not clear:
print('Using "pre" requires a corresponding tag.')
return
if not dev and not pre:
new_version = current_version.clear(pre=True, dev=True)
if pre and dev:
if pre and dev and not clear:
print("Pre and dev cannot be used together.")
return
if not dev and not pre:
new_version = new_version.clear(pre=True, dev=True)
elif dev:
new_version = new_version.bump_dev()
elif pre:
Expand Down

0 comments on commit 3985ae3

Please sign in to comment.