mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-30 09:05:23 +02:00
update automatic makefile
This commit is contained in:
parent
75df808dad
commit
a2a9863ac1
24
Makefile
24
Makefile
@ -75,7 +75,7 @@ $(VERSION_FILES): ./manifest.json
|
||||
|
||||
# build outputs
|
||||
.SECONDEXPANSION:
|
||||
$(OUTPUTS): %/dist/index.html: $$(shell find $$*/src -type f -not -name *.test.js) $$(shell find $$*/public -type f) $$(shell find $$* -name 'yarn.lock' -o -name 'package.json' -not -path '*node_modules*') $$*/*.html $$*/*.js
|
||||
$(OUTPUTS): %/dist/index.html: $$(shell find '$$*' -type d \( -name node_modules -o -path '$$*/dist' -o -path '*node_modules*' \) -prune -o -type f -not \( -name .gitignore \) -print)
|
||||
@echo -e $(call cyantext,Building $*)
|
||||
$(NPM_PREFIX) $* install
|
||||
ifeq ($(AUTO_UPGRADE_DEPS),1)
|
||||
@ -88,7 +88,7 @@ endif
|
||||
# system install, requires `systemctl restart cockpit.socket`
|
||||
# runs plugin-install-* for each plugin
|
||||
.SECONDEXPANSION:
|
||||
install install-local install-remote: default $$(addprefix plugin-$$@-, $$(PLUGIN_SRCS))
|
||||
install install-local install-remote: $$(OUTPUTS) $$(addprefix plugin-$$@-, $$(PLUGIN_SRCS)) system-files-$$@
|
||||
ifeq ($(RESTART_COCKPIT), 1)
|
||||
ifndef DESTDIR
|
||||
$(SSH) systemctl stop cockpit.socket
|
||||
@ -120,11 +120,23 @@ plugin-install-remote-% : INSTALL_SUFFIX=-test
|
||||
plugin-install-remote-% : SSH=ssh $(REMOTE_TEST_USER)@$(REMOTE_TEST_HOST)
|
||||
plugin-install-remote-% : REMOTE_TEST_HOME=$(shell ssh $(REMOTE_TEST_USER)@$(REMOTE_TEST_HOST) 'echo $$HOME')
|
||||
|
||||
.SECONDEXPANSION:
|
||||
test: $$(addprefix test-, $$(PLUGIN_SRCS))
|
||||
system-files-install:
|
||||
-cp -af system_files/* $(DESTDIR)/
|
||||
|
||||
test-%:
|
||||
$(NPM_PREFIX) $* test
|
||||
system-files-install-local:
|
||||
-cp -af system_files/* $(DESTDIR)/
|
||||
|
||||
system-files-install-remote:
|
||||
-rsync -avh system_files/* $(REMOTE_TEST_USER)@$(REMOTE_TEST_HOST):$(DESTDIR)/
|
||||
|
||||
package-generic: default
|
||||
PKG_NAME="$$(jq -r '[ .name, .version ] | join("_")' ./manifest.json)"'_generic' && \
|
||||
rm -f "$${PKG_NAME}.{zip,tar.gz}" && \
|
||||
ln -snf . "$${PKG_NAME}" && \
|
||||
readarray -t FILES < <(find -H "$${PKG_NAME}" -type d \( -name 'src' -o -name 'node_modules' \) -prune -o -type f \( -path '*/dist/*' -o -path '*/system_files/*' -o -name package.json -o -iname 'makefile' -o -iname 'licen[sc]e' -o -iname 'readme.md' -o -name 'manifest.json' \) -print) && \
|
||||
zip -q "$${PKG_NAME}.zip" "$${FILES[@]}" && \
|
||||
tar -czf "$${PKG_NAME}.tar.gz" "$${FILES[@]}" && \
|
||||
rm "$${PKG_NAME}"
|
||||
|
||||
clean: FORCE
|
||||
rm $(dir $(OUTPUTS)) -rf
|
||||
|
Loading…
x
Reference in New Issue
Block a user