Skip to content

Commit 30b9412

Browse files
author
Kinnaird McQuade
committed
Make the version in its own file
1 parent a0abccb commit 30b9412

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

docs/contributing/versioning.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ We try to follow [Semantic Versioning](https://semver.org/) as much as possible.
66
Version bumps
77
-------------
88

9-
Just edit the `policy_sentry/bin/policy_sentry` file and update the `__version__` variable:
9+
Just edit the `policy_sentry/bin/version.py` file and update the `__version__` variable:
1010

1111
```python
12-
#! /usr/bin/env python
13-
"""
14-
policy_sentry is a tool for generating least-privilege IAM Policies.
15-
"""
16-
__version__ = '0.6.3' # EDIT THIS
12+
__version__ = '0.11.3' # EDIT THIS
1713
```
1814

1915
The `setup.py` file will automatically pick up the new version from that file for the package info. The `@click.version_option` decorator will also pick that up for the command line.

policy_sentry/bin/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"""
33
Policy Sentry is a tool for generating least-privilege IAM Policies.
44
"""
5-
__version__ = "0.11.3"
65
import click
76
from policy_sentry import command
7+
from policy_sentry.bin.version import __version__
88

99

1010
@click.group()

policy_sentry/bin/version.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# pylint: disable=missing-module-docstring
2+
__version__ = "0.11.3"

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def get_version():
1818
HERE,
1919
"policy_sentry",
2020
"bin",
21-
"cli.py"
21+
"version.py"
2222
)
2323
).read()
2424
return VERSION_RE.search(init).group(1)
@@ -59,5 +59,4 @@ def get_description():
5959
zip_safe=True,
6060
keywords='aws iam roles policy policies privileges security',
6161
python_requires='>=3.6',
62-
# scripts=['policy_sentry/bin/policy_sentry'],
6362
)

0 commit comments

Comments
 (0)