# Path: awslimitchecker/version.py
# _VERSION = '.'.join([str(x) for x in _VERSION_TUP])


import os
import sys
import logging
import json
import subprocess
import re
from shutil import rmtree
from time import sleep
from copy import deepcopy
from datetime import datetime
from github_releaser import GithubReleaser
from release_utils import (
    StepRegistry, prompt_user, BaseStep, fail, is_git_dirty, TravisChecker
)
from awslimitchecker.version import _VERSION as VERSION
from update_integration_iam_policy import IntegrationIamPolicyUpdater
logger = logging.getLogger()

for n in ['urllib3', 'urllib', 'requests', 'git', 'github3']:
    l = logging.getLogger(n)
    l.setLevel(logging.ERROR)
    l.propagate = True


steps = StepRegistry()


@steps.register(1)
class InitialChecks(BaseStep):

    def run(self):
        b = self._current_branch
        if b == 'master':
            fail('release.py cannot be run from master for a new release')
        rbranch = 'issues/%d' % self._release_issue_num
        if b != rbranch:
            fail(
                'You must run this script from a release branch called '
                '"%s"' % rbranch
            )
        if not prompt_user(
            'Have you confirmed that there are CHANGES.rst entries for all '
            'major changes?'
        ):
            fail('Please check CHANGES.rst before releasing code.')
        if not prompt_user(

# Path: awslimitchecker/version.py
# _VERSION = '.'.join([str(x) for x in _VERSION_TUP])


# Path: dev/release.py
import os
import sys
import logging
import json
import subprocess
import re
from shutil import rmtree
from time import sleep
from copy import deepcopy
from datetime import datetime
from github_releaser import GithubReleaser
from release_utils import (
    StepRegistry, prompt_user, BaseStep, fail, is_git_dirty, TravisChecker
)
from awslimitchecker.version import _VERSION as VERSION
from update_integration_iam_policy import IntegrationIamPolicyUpdater

logger = logging.getLogger()

for n in ['urllib3', 'urllib', 'requests', 'git', 'github3']:
    l = logging.getLogger(n)
    l.setLevel(logging.ERROR)
    l.propagate = True


steps = StepRegistry()


@steps.register(1)
class InitialChecks(BaseStep):

    def run(self):
        b = self._current_branch
        if b == 'master':
            fail('release.py cannot be run from master for a new release')
        rbranch = 'issues/%d' % self._release_issue_num
        if b != rbranch:
            fail(
                'You must run this script from a release branch called '
                '"%s"' % rbranch
            )
        if not prompt_user(
            'Have you confirmed that there are CHANGES.rst entries for all '
            'major changes?'
        ):
            fail('Please check CHANGES.rst before releasing code.')
        if not prompt_user(

            'Is the current version (%s) the version being released?' % VERSION