diff --git a/autorelease-travis.yml b/autorelease-travis.yml index bbd4d90..e788623 100644 --- a/autorelease-travis.yml +++ b/autorelease-travis.yml @@ -1,4 +1,4 @@ -# AUTORELEASE v0.2.4.dev0 +# AUTORELEASE v0.2.6 # for nonrelease, use @master # for release, use v${VERSION}, e.g., v1.0.0 stages: @@ -9,7 +9,7 @@ stages: - deploy pypi import: - - dwhswenson/autorelease:travis_stages/deploy_testpypi.yml@master - - dwhswenson/autorelease:travis_stages/test_testpypi.yml@master - - dwhswenson/autorelease:travis_stages/cut_release.yml@master - - dwhswenson/autorelease:travis_stages/deploy_pypi.yml@master + - dwhswenson/autorelease:travis_stages/deploy_testpypi.yml@v0.2.6 + - dwhswenson/autorelease:travis_stages/test_testpypi.yml@v0.2.6 + - dwhswenson/autorelease:travis_stages/cut_release.yml@v0.2.6 + - dwhswenson/autorelease:travis_stages/deploy_pypi.yml@v0.2.6 diff --git a/autorelease/check_runners.py b/autorelease/check_runners.py index eb3d70a..656f150 100644 --- a/autorelease/check_runners.py +++ b/autorelease/check_runners.py @@ -75,6 +75,8 @@ def _is_release_tests(self, expected): def _reasonable_desired_version_test(self, allow_equal, allow_patch_skip=False): + print("allow equal ", allow_equal) + print("allow patch skip", allow_patch_skip) return [ ( self.git_repo_checks.reasonable_desired_version, [], diff --git a/autorelease/gh_actions_stages/autorelease-default-env.sh b/autorelease/gh_actions_stages/autorelease-default-env.sh index 74dd461..f1da159 100644 --- a/autorelease/gh_actions_stages/autorelease-default-env.sh +++ b/autorelease/gh_actions_stages/autorelease-default-env.sh @@ -1,4 +1,4 @@ -INSTALL_AUTORELEASE="python -m pip install autorelease==0.2.3" +INSTALL_AUTORELEASE="python -m pip install autorelease==0.2.6" if [ -f autorelease-env.sh ]; then source autorelease-env.sh fi diff --git a/autorelease/git_repo_checks.py b/autorelease/git_repo_checks.py index 5371a9b..f60d307 100644 --- a/autorelease/git_repo_checks.py +++ b/autorelease/git_repo_checks.py @@ -25,6 +25,7 @@ class GitReleaseChecks(object): def __init__(self, repo_path='.'): self.repo_path = repo_path self.repo = git.Repo(self.repo_path) + self.repo.remotes.origin.fetch() self.stable_branch = 'stable' self.dev_branch = 'master' @@ -87,12 +88,17 @@ def reasonable_desired_version(self, desired_version, allow_equal=False, v_desired = vers.Version(desired_version) v_max = vers.Version(max_version) - if allow_equal and v_desired == v_max: - return "" + no_increase_str = ("Bad update: New version doesn't increase on " + "last tag: " + update_str + "\n") + + if v_desired == v_max: + if allow_equal: + return "" + else: + return no_increase_str if v_desired < v_max: - return ("Bad update: New version doesn't increase on last tag: " - + update_str + "\n") + return no_increase_str bad_update = skipped_version((old_major, old_minor, old_patch), (new_major, new_minor, new_patch), diff --git a/autorelease/script_utils.py b/autorelease/script_utils.py index 4a7ac1c..deb13a3 100644 --- a/autorelease/script_utils.py +++ b/autorelease/script_utils.py @@ -100,6 +100,7 @@ def guess_github_user(self): def repo(self): if self._repo is None and hasattr(self.opts, 'repo'): self._repo = git.Repo(self.opts.repo) + self._repo.remotes.origin.fetch() return self._repo @property diff --git a/autorelease/scripts/release.py b/autorelease/scripts/release.py index e4274c5..fff8ffe 100644 --- a/autorelease/scripts/release.py +++ b/autorelease/scripts/release.py @@ -64,6 +64,7 @@ def main(): print(opts) repo = git.Repo(opts.repo) + repo.remotes.origin.fetch() owner, user, name = get_github_info(repo) if opts.repo_owner is not None: diff --git a/devtools/conda-recipe/meta.yaml b/devtools/conda-recipe/meta.yaml index 67f7278..8e62cd6 100644 --- a/devtools/conda-recipe/meta.yaml +++ b/devtools/conda-recipe/meta.yaml @@ -1,7 +1,7 @@ package: name: autorelease # add ".dev0" for unreleased versions - version: "0.2.5" + version: "0.2.6" source: path: ../../ diff --git a/setup.cfg b/setup.cfg index f9adfee..f80d624 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = autorelease -version = 0.2.5 +version = 0.2.6 # version should end in .dev0 if this isn't to be released short_description = Tools to keep the release process clean. description = Tools to keep the release process clean.