mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 16:54:45 +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')
|
locale.textdomain('gnome-twofactorauth')
|
||||||
gettext.bindtextdomain('gnome-twofactorauth', '@LOCALE_DIR@')
|
gettext.bindtextdomain('gnome-twofactorauth', '@LOCALE_DIR@')
|
||||||
gettext.textdomain('gnome-twofactorauth')
|
gettext.textdomain('gnome-twofactorauth')
|
||||||
version = "@GITVERSION@"
|
GIT_VERSION = "@GITVERSION@"
|
||||||
if not version:
|
VERSION = "@VERSION@"
|
||||||
version = "@VERSION@"
|
|
||||||
env["DATA_DIR"] = "@DATADIR@"
|
env["DATA_DIR"] = "@DATADIR@"
|
||||||
env["LOCALE_DIR"] = '@LOCALE_DIR@'
|
env["LOCALE_DIR"] = '@LOCALE_DIR@'
|
||||||
print("@LOCALE_DIR@")
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(prog="Gnome-TwoFactorAuth")
|
parser = argparse.ArgumentParser(prog="Gnome-TwoFactorAuth")
|
||||||
parser.add_argument("--debug", "-d", action="store_true",
|
parser.add_argument("--debug", "-d", action="store_true",
|
||||||
|
@ -66,7 +64,9 @@ if __name__ == "__main__":
|
||||||
'gnome-twofactorauth.gresource'))
|
'gnome-twofactorauth.gresource'))
|
||||||
Gio.Resource._register(resource)
|
Gio.Resource._register(resource)
|
||||||
if args.version:
|
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:
|
elif args.about:
|
||||||
about_dialog = application.Application.about_dialog()
|
about_dialog = application.Application.about_dialog()
|
||||||
about_dialog.run()
|
about_dialog.run()
|
||||||
|
|
|
@ -7,7 +7,7 @@ python = find_program('python3')
|
||||||
git = find_program('git', required : false)
|
git = find_program('git', required : false)
|
||||||
intltool_merge = find_program('intltool-merge')
|
intltool_merge = find_program('intltool-merge')
|
||||||
if git.found()
|
if git.found()
|
||||||
GITVERSION = run_command(git, 'describe', '--always').stdout().strip()
|
GITVERSION = run_command(git, 'rev-parse', 'HEAD').stdout().strip()
|
||||||
else
|
else
|
||||||
GITVERSION = ''
|
GITVERSION = ''
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue