blob: ca967f0dce5a83b2784e91373c0de0fb1c9a754d [file] [log] [blame]
Alex Gaynor0e10f572014-01-06 13:17:31 -08001# Licensed under the Apache License, Version 2.0 (the "License");
2# you may not use this file except in compliance with the License.
3# You may obtain a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS,
9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10# implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13from __future__ import absolute_import, division, print_function
14
Alex Gaynor6bc3af72014-01-06 12:04:53 -080015import invoke
16
17
Alex Gaynor6bc3af72014-01-06 12:04:53 -080018@invoke.task
19def release(version):
20 """
21 ``version`` should be a string like '0.4' or '1.0'.
22 """
Alex Gaynor6bc3af72014-01-06 12:04:53 -080023 invoke.run("git tag -s {}".format(version))
Alex Gaynor6b1235a2014-01-06 15:28:59 -080024 invoke.run("git push --tags")
Alex Gaynor6bc3af72014-01-06 12:04:53 -080025
Alex Gaynorfea893c2014-01-07 11:06:51 -080026 invoke.run("python setup.py sdist")
Alex Gaynor6bc3af72014-01-06 12:04:53 -080027 invoke.run("twine upload -s dist/cryptography-{}*".format(version))