mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 22:12:15 +00:00
work
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
from ssh_lib import PLANETILER_BIN, PLANETILER_SRC
|
||||
from ssh_lib.config import config
|
||||
from ssh_lib.java import java
|
||||
from ssh_lib.utils import exists, sudo_cmd
|
||||
|
||||
|
||||
PLANETILER_COMMIT = 'cc769c'
|
||||
PLANETILER_PATH = f'{PLANETILER_BIN}/planetiler.jar'
|
||||
PLANETILER_PATH = f'{config.planetiler_bin}/planetiler.jar'
|
||||
|
||||
|
||||
def install_planetiler(c):
|
||||
@@ -15,24 +15,24 @@ def install_planetiler(c):
|
||||
java(c)
|
||||
|
||||
c.sudo('rm -rf /root/.m2') # cleaning maven cache
|
||||
c.sudo(f'rm -rf {PLANETILER_BIN} {PLANETILER_SRC}')
|
||||
c.sudo(f'mkdir -p {PLANETILER_BIN} {PLANETILER_SRC}')
|
||||
c.sudo(f'rm -rf {config.planetiler_bin} {config.planetiler_src}')
|
||||
c.sudo(f'mkdir -p {config.planetiler_bin} {config.planetiler_src}')
|
||||
|
||||
c.sudo('git config --global advice.detachedHead false')
|
||||
c.sudo(
|
||||
f'git clone --recurse-submodules https://github.com/onthegomap/planetiler.git {PLANETILER_SRC}'
|
||||
f'git clone --recurse-submodules https://github.com/onthegomap/planetiler.git {config.planetiler_src}'
|
||||
)
|
||||
|
||||
sudo_cmd(c, f'cd {PLANETILER_SRC} && git checkout {PLANETILER_COMMIT}')
|
||||
sudo_cmd(c, f'cd {PLANETILER_SRC} && git submodule update --init --recursive')
|
||||
sudo_cmd(c, f'cd {config.planetiler_src} && git checkout {PLANETILER_COMMIT}')
|
||||
sudo_cmd(c, f'cd {config.planetiler_src} && git submodule update --init --recursive')
|
||||
|
||||
sudo_cmd(c, f'cd {PLANETILER_SRC} && ./mvnw clean test package')
|
||||
sudo_cmd(c, f'cd {config.planetiler_src} && ./mvnw clean test package')
|
||||
|
||||
c.sudo(
|
||||
f'mv {PLANETILER_SRC}/planetiler-dist/target/planetiler-dist-*-SNAPSHOT-with-deps.jar {PLANETILER_PATH}',
|
||||
f'mv {config.planetiler_src}/planetiler-dist/target/planetiler-dist-*-SNAPSHOT-with-deps.jar {PLANETILER_PATH}',
|
||||
warn=True,
|
||||
)
|
||||
|
||||
c.sudo(f'java -jar {PLANETILER_PATH} --help', hide=True)
|
||||
|
||||
c.sudo(f'rm -rf {PLANETILER_SRC}')
|
||||
c.sudo(f'rm -rf {config.planetiler_src}')
|
||||
|
||||
Reference in New Issue
Block a user