From 6bd397592d8a893a7183354afe19c0f08a91ab01 Mon Sep 17 00:00:00 2001 From: Scstechr Date: Mon, 15 Jul 2019 21:41:50 +0900 Subject: [PATCH] VERSION statement inside __init__ of src/ --- gch.py | 5 +++-- gdiff.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gch.py b/gch.py index 1c10ae3..297675b 100755 --- a/gch.py +++ b/gch.py @@ -5,7 +5,6 @@ ================== ''' -VERSION = 1.6 import sys, subprocess as sp from os import path, chdir, getcwd import os @@ -16,6 +15,8 @@ from src.git import * from src.diff import diffhash, logviewer +from src import VERSION +GCH_VERSION = VERSION issues.version(3) defaults = {} @@ -105,7 +106,7 @@ def main(init, defaults['diff'] = diff if version: - print(" gch version :", VERSION) + print(" gch version :", GCH_VERSION) sys.exit(0) gitfolder = path.join(gitpath, '.git') diff --git a/gdiff.py b/gdiff.py index 12f06e0..30d7924 100755 --- a/gdiff.py +++ b/gdiff.py @@ -5,11 +5,12 @@ ================== ''' -VERSION = 1.6 import click import sys from src.diff import diffhash, logviewer +from src import VERSION +GDIFF_VERSION = VERSION @click.command() @click.option('-v', '--verbose', is_flag='False', help='Detailed diff.') @@ -19,7 +20,7 @@ @click.option('--version', is_flag='False', help='Check version of gdiff.') def main(verbose, head, author, log, version): if version: - print(" gdiff version :", VERSION) + print(" gdiff version :", GDIFF_VERSION) sys.exit(0) if log: logviewer(verbose, head)