Skip to content

Commit

Permalink
track version in the file and provides a --version command for the user
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonstz committed Nov 21, 2019
1 parent 5e4ed3b commit 2b76860
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pynps.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
from tempfile import TemporaryDirectory as TmpFolder
from shutil import copyfile

##FUNCTIONS##
##Versioning
VERSION = "0.5"

##FUNCTIONS##

def create_folder(location):
try:
Expand Down Expand Up @@ -553,7 +555,7 @@ def main():
type=str, required=False, choices=["1", "2", "3", "4", "5", "6", "7", "8", "9"])
parser.add_argument("-u", "--update", help="update database.",
action="store_true")
parser.add_argument('--version', action='version', version='%(prog)s v0.5')
parser.add_argument('--version', action='version', version='%(prog)s v'+VERSION)

args = parser.parse_args()

Expand Down

0 comments on commit 2b76860

Please sign in to comment.