Skip to content

Commit

Permalink
Merge pull request #87 from dwhswenson/release-0.2.6
Browse files Browse the repository at this point in the history
Release 0.2.6
  • Loading branch information
dwhswenson authored Dec 20, 2020
2 parents 34d665b + d5c6fb7 commit 7e2630a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
10 changes: 5 additions & 5 deletions autorelease-travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
2 changes: 2 additions & 0 deletions autorelease/check_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, [],
Expand Down
2 changes: 1 addition & 1 deletion autorelease/gh_actions_stages/autorelease-default-env.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 10 additions & 4 deletions autorelease/git_repo_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions autorelease/script_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions autorelease/scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion devtools/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: autorelease
# add ".dev0" for unreleased versions
version: "0.2.5"
version: "0.2.6"

source:
path: ../../
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 7e2630a

Please sign in to comment.