mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
Remove test code, add git commit to version flag
This commit is contained in:
parent
a8de58e629
commit
ccaefc30ad
2 changed files with 7 additions and 7 deletions
|
@ -38,12 +38,10 @@ if __name__ == "__main__":
|
|||
locale.textdomain('gnome-twofactorauth')
|
||||
gettext.bindtextdomain('gnome-twofactorauth', '@LOCALE_DIR@')
|
||||
gettext.textdomain('gnome-twofactorauth')
|
||||
version = "@GITVERSION@"
|
||||
if not version:
|
||||
version = "@VERSION@"
|
||||
GIT_VERSION = "@GITVERSION@"
|
||||
VERSION = "@VERSION@"
|
||||
env["DATA_DIR"] = "@DATADIR@"
|
||||
env["LOCALE_DIR"] = '@LOCALE_DIR@'
|
||||
print("@LOCALE_DIR@")
|
||||
|
||||
parser = argparse.ArgumentParser(prog="Gnome-TwoFactorAuth")
|
||||
parser.add_argument("--debug", "-d", action="store_true",
|
||||
|
@ -66,7 +64,9 @@ if __name__ == "__main__":
|
|||
'gnome-twofactorauth.gresource'))
|
||||
Gio.Resource._register(resource)
|
||||
if args.version:
|
||||
sys.exit("Version : " + str(version))
|
||||
if GIT_VERSION:
|
||||
print("Git current commit : " + str(GIT_VERSION))
|
||||
sys.exit("Version : " + str(VERSION))
|
||||
elif args.about:
|
||||
about_dialog = application.Application.about_dialog()
|
||||
about_dialog.run()
|
||||
|
|
|
@ -7,7 +7,7 @@ python = find_program('python3')
|
|||
git = find_program('git', required : false)
|
||||
intltool_merge = find_program('intltool-merge')
|
||||
if git.found()
|
||||
GITVERSION = run_command(git, 'describe', '--always').stdout().strip()
|
||||
GITVERSION = run_command(git, 'rev-parse', 'HEAD').stdout().strip()
|
||||
else
|
||||
GITVERSION = ''
|
||||
endif
|
||||
|
|
Loading…
Add table
Reference in a new issue