Commit ae63b3cc authored by rgaudin's avatar rgaudin
Browse files

Better installer version usage

- add version information to CLI so it's not limited to GUI
- generate version.xxx page using ansible_local so it survives a `rename` (for demo mostly)
parent 5efe2cda
......@@ -5,6 +5,7 @@
* Fixed etcher-cli log display on macOS
* Added http://version.<name>.hotspot to display Kiwix Hotspot version on Plug
* Fixed conflict between favicon and logo if both have same name in JSON file
* Added version to CLI
2.0-rc13
* Updated Wikifundi language packs (2018-10-24)
......
......@@ -17,7 +17,7 @@ project_name: ideasbox
ideascube_id: pibox
# System
installer_version: devel
installer_version: unknown
disk: /dev/mmcblk0
root_partition: "{{ disk }}p2"
data_partition: "{{ disk }}p3"
......
......@@ -27,7 +27,7 @@
</section>
</header>
<div class="content">
<h2>This Hotspot is running <em>Kiwix Hotspot <code>{{ installer_version }}</code></em></h2>
<h2>This Hotspot is running <em>Kiwix Hotspot <code>{{ ansible_local.config.installer_version }}</code></em></h2>
<p>Please, <a href="http://{{ fqdn }}">go back home</a> to continue.</p>
</div>
<footer>
......
......@@ -20,6 +20,7 @@ from backend.content import (
)
from util import CancelEvent
from util import check_user_inputs
from version import get_version_str
from util import CLILogger, b64decode
from util import get_free_space_in_dir
from util import get_adjusted_image_size
......@@ -32,6 +33,7 @@ import humanfriendly
CANCEL_TIMEOUT = 5
logger = CLILogger()
logger.std("Kiwix Hotspot {v}".format(v=get_version_str()))
def set_config(config, args):
......@@ -145,7 +147,7 @@ for catalog in get_catalogs(logger):
languages = [code for code, language in data.ideascube_languages]
defaults = {
"name": "Kiwix Hotspot",
"name": "Kiwix",
"timezone": str(tzlocal.get_localzone()),
"language": "en",
"size": "8GB",
......@@ -268,7 +270,7 @@ if args.sdcard and not os.path.exists(args.sdcard):
sys.exit(1)
# display configuration and offer time to cancel
print("Kiwix Hotspot configuration:")
print("Configuration:")
keys = args.__dict__.keys()
longest = max([len(key) for key in keys])
for name in keys:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment