mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 22:12:15 +00:00
host_manager
This commit is contained in:
@@ -7,11 +7,11 @@ from pathlib import Path
|
||||
import click
|
||||
import requests
|
||||
from http_host_lib import DEFAULT_ASSETS_DIR, DEFAULT_RUNS_DIR, MNT_DIR
|
||||
from http_host_lib.deploy_tileset import deploy_tileset
|
||||
from http_host_lib.download_fonts import download_fonts
|
||||
from http_host_lib.download_tileset import download_and_extract_tileset
|
||||
from http_host_lib.mount import clean_up_mounts, create_fstab
|
||||
from http_host_lib.nginx import write_nginx_config
|
||||
from http_host_lib.set_tileset_versions import set_tileset_versions
|
||||
from http_host_lib.utils import assert_linux, assert_single_process, assert_sudo
|
||||
|
||||
|
||||
@@ -114,13 +114,13 @@ def mount():
|
||||
|
||||
|
||||
@cli.command()
|
||||
def deploy_tileset_version():
|
||||
def set_latest_versions():
|
||||
"""
|
||||
Deploys the latest tileset version specified by
|
||||
Sets the latest version of the tilesets to the version specified by
|
||||
https://assets.openfreemap.com/versions/deployed_planet.txt
|
||||
|
||||
1. Check if the given version is present on the disk and is mounted
|
||||
2. Write to a version file
|
||||
1. Checks if the given version is present on the disk and is mounted
|
||||
2. Writes to a version file
|
||||
"""
|
||||
|
||||
assert_linux()
|
||||
@@ -129,7 +129,7 @@ def deploy_tileset_version():
|
||||
if not MNT_DIR.exists():
|
||||
sys.exit('mount needs to be run first')
|
||||
|
||||
return deploy_tileset()
|
||||
return set_tileset_versions()
|
||||
|
||||
|
||||
@cli.command()
|
||||
@@ -166,7 +166,7 @@ def sync(ctx):
|
||||
|
||||
ctx.invoke(download_assets)
|
||||
|
||||
deploy_done = ctx.invoke(deploy_tileset_version)
|
||||
deploy_done = ctx.invoke(set_latest_versions)
|
||||
|
||||
if download_done or deploy_done:
|
||||
ctx.invoke(nginx_sync)
|
||||
|
||||
Reference in New Issue
Block a user