mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
parent
6f4d458855
commit
90ac3e3ad5
3 changed files with 14 additions and 6 deletions
|
@ -27,9 +27,7 @@ from . import parser, tokenizer, decompiler, interactive_port
|
|||
from .utils import Colors
|
||||
from .xml_emitter import XmlEmitter
|
||||
|
||||
|
||||
VERSION = "0.1.0"
|
||||
|
||||
VERSION = "uninstalled"
|
||||
|
||||
class BlueprintApp:
|
||||
def main(self):
|
||||
|
@ -53,6 +51,8 @@ class BlueprintApp:
|
|||
|
||||
self.add_subcommand("help", "Show this message", self.cmd_help)
|
||||
|
||||
self.parser.add_argument("--version", action="version", version=VERSION)
|
||||
|
||||
try:
|
||||
opts = self.parser.parse_args()
|
||||
opts.func(opts)
|
||||
|
@ -144,5 +144,7 @@ class BlueprintApp:
|
|||
return ast.generate(), warnings
|
||||
|
||||
|
||||
def main():
|
||||
def main(version):
|
||||
global VERSION
|
||||
VERSION = version
|
||||
BlueprintApp().main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue