Skip to content

Commit

Permalink
Add -V / --version argument to show version. Bump version to 1.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Feb 16, 2021
1 parent d119ee6 commit c1f86e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions bin/swarm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import psutil
import configargparse
import locust_plugins
import locust.util.timespan
import locust_swarm

logging.basicConfig(
format="%(asctime)s,%(msecs)d %(levelname)-4s [%(filename)s:%(lineno)d] %(message)s",
Expand Down Expand Up @@ -58,6 +59,13 @@ parser.add_argument(
help=configargparse.SUPPRESS,
env_var="LOCUST_RUN_TIME",
)
parser.add_argument(
"--version",
"-V",
action="version",
help="Show program's version number and exit",
version="%(prog)s {}".format(locust_swarm.__version__),
)

args, unrecognized_args = parser.parse_known_args()

Expand Down
2 changes: 1 addition & 1 deletion locust_swarm/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.15"
__version__ = "1.0.16"

0 comments on commit c1f86e1

Please sign in to comment.