From 5eb655779099df44e8cf5ef87ff40c570d5a98c1 Mon Sep 17 00:00:00 2001 From: Kazutoshi Noguchi Date: Thu, 30 Mar 2017 21:15:26 +0900 Subject: [PATCH] Add --version. Release version 0.1.0. --- bin/cshc | 1 + lib/cshc/__init__.py | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/cshc b/bin/cshc index 2427ae6..68ff384 100755 --- a/bin/cshc +++ b/bin/cshc @@ -36,6 +36,7 @@ parser.add_argument('-v', help = 'verbose mode', action = 'store_true', dest = 'verbose') parser.add_argument('-S', help = 'output assembly code.', action = 'store_true', dest = 'compile_only') +parser.add_argument('--version', action='version', version='%(prog)s ' + cshc.VERSION) args = parser.parse_args() archobj = cshc.arch(args.arch, args.verbose) diff --git a/lib/cshc/__init__.py b/lib/cshc/__init__.py index 7b8df59..a0af312 100644 --- a/lib/cshc/__init__.py +++ b/lib/cshc/__init__.py @@ -15,4 +15,5 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . """ +VERSION = "0.1.0" from cshc.arch import *