Make include local & remote-build
This commit is contained in:
19
Makefile
19
Makefile
@@ -1,9 +1,14 @@
|
||||
help:
|
||||
@echo ''
|
||||
@echo 'Commands available:'
|
||||
@echo ' pull: get newest changes from server (data/ dir only)'
|
||||
@echo ' push: overwrite source files on server (excl. data/ dir)'
|
||||
@echo ' push-list: replace custom lists like "Messengers", etc.'
|
||||
@echo ' pull: get newest changes from server (data/ dir only)'
|
||||
@echo ' push: overwrite source files on server (excl. data/ dir)'
|
||||
@echo ' push-list: replace custom lists like "Messengers", etc.'
|
||||
@echo ' remote-build: force-rebuild all remote files (index & html)'
|
||||
@echo ' local: force-rebuild all local files (index & html)'
|
||||
@echo ''
|
||||
@echo 'Usage:'
|
||||
@echo ' make push remote-build SSH=your_ssh_key'
|
||||
@echo ''
|
||||
check_defined_ssh = \
|
||||
$(if $(value SSH),, \
|
||||
@@ -13,9 +18,13 @@ pull:
|
||||
rsync -ralptv --delete -e ssh $(SSH):/var/www/de-appchk/data/ "data/"
|
||||
push:
|
||||
@:$(call check_defined_ssh,push)
|
||||
# --dry-run
|
||||
rsync -rlptv --delete --exclude=.DS_Store --exclude=.git/ "." --exclude=/{data/,src/{__pycache__,lists}/,error.log} --include=/out/static/ --exclude=/out/* $(SSH):/var/www/de-appchk/
|
||||
# && ssh ma chown -R www-data:www-data /var/www/de-appchk
|
||||
@# --dry-run && ssh $(SSH) chown -R www-data:www-data /var/www/de-appchk
|
||||
push-list:
|
||||
@:$(call check_defined_ssh,push-list)
|
||||
rsync -rlptv --delete --exclude=.DS_Store --exclude=.git/ "data/_lists/" $(SSH):/var/www/de-appchk/data/_lists/
|
||||
remote-build:
|
||||
@:$(call check_defined_ssh,remote-build)
|
||||
ssh $(SSH) /var/www/de-appchk/src/main.py run '*'
|
||||
local:
|
||||
src/main.py run '*'
|
||||
|
||||
@@ -31,7 +31,7 @@ def print_usage_and_exit():
|
||||
exit(0)
|
||||
|
||||
|
||||
def rebuild_html(bundle_ids=None, cat_ids=None, inclIApp=True, inclRoot=False):
|
||||
def rebuild_html(bundle_ids=None, cat_ids=None, inclIApp=True):
|
||||
# all of these must happen after index_app_names
|
||||
if bundle_ids:
|
||||
html_bundle.process(bundle_ids) # after index_rank
|
||||
@@ -42,7 +42,7 @@ def rebuild_html(bundle_ids=None, cat_ids=None, inclIApp=True, inclRoot=False):
|
||||
print('no new bundle, not rebuilding index')
|
||||
html_ranking.process() # after html_categories & html_index_apps
|
||||
app_count, dom_count = html_index_domains.process() # after index_domains
|
||||
html_root.process(app_count, dom_count, inclStatic=inclRoot)
|
||||
html_root.process(app_count, dom_count, inclStatic=True)
|
||||
|
||||
|
||||
def del_id(bundle_ids):
|
||||
@@ -133,7 +133,7 @@ try:
|
||||
index_categories.process(['*'], force=True)
|
||||
index_rank.process(['*'])
|
||||
index_domains.process(['*'])
|
||||
rebuild_html(inclRoot=True)
|
||||
rebuild_html()
|
||||
elif cmd == 'run':
|
||||
if len(params) == 0:
|
||||
print_usage_and_exit()
|
||||
|
||||
Reference in New Issue
Block a user