Skip to content

Commit

Permalink
only use annotated tags for version calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Jan 7, 2018
1 parent 94a173a commit 15f525e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mitmproxy/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_version(dev: bool = False, build: bool = False, refresh: bool = False) -
here = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
try:
git_describe = subprocess.check_output(
['git', 'describe', '--tags', '--long'],
['git', 'describe', '--long'],
stderr=subprocess.STDOUT,
cwd=here,
)
Expand Down
4 changes: 4 additions & 0 deletions release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Make sure run all these steps on the correct branch you want to create a new rel
- Update CHANGELOG
- Verify that all CI tests pass
- Tag the release and push to Github
- For alphas, betas, and release candidates, use lightweight tags.
This is necessary so that the .devXXXX counter does not reset.
- For final releases, use annotated tags.
This makes the .devXXXX counter reset.
- Wait for tag CI to complete

## GitHub Release
Expand Down
2 changes: 1 addition & 1 deletion test/mitmproxy/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ def test_get_version():
m.return_value = b"tag-2-cafecafe"
assert version.get_version(True, True) == "3.0.0.dev2-0xcafecaf"

m.side_effect = subprocess.CalledProcessError(-1, 'git describe --tags --long')
m.side_effect = subprocess.CalledProcessError(-1, 'git describe --long')
assert version.get_version(True, True) == "3.0.0"

0 comments on commit 15f525e

Please sign in to comment.