mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 09:13:37 +02:00
jw-projects.py: Rename it to jw-pkg.py
jw-projects.py is now a multi-call executable, with "projects" being just one of its subcommands. Rename it to jw-pkg.py to reflect that. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
1154cb984c
commit
132dce8b3f
7 changed files with 23 additions and 20 deletions
|
|
@ -22,7 +22,7 @@ Q ?= @
|
|||
|
||||
ifeq ($(origin PROJECTS_DIR_REMOTE_BASE),undefined)
|
||||
ifneq ($(wildcard $(JWBDIR)),)
|
||||
PROJECTS_DIR_REMOTE_BASE := $(shell /usr/bin/python3 $(JWBDIR)/scripts/jw-projects.py -p . projects get-auth-info --remote-base --only-values)
|
||||
PROJECTS_DIR_REMOTE_BASE := $(shell /usr/bin/python3 $(JWBDIR)/scripts/jw-pkg.py -p . projects get-auth-info --remote-base --only-values)
|
||||
endif
|
||||
ifeq ($(PROJECTS_DIR_REMOTE_BASE),)
|
||||
PROJECTS_DIR_REMOTE_BASE := https://janware.com/code
|
||||
|
|
@ -44,7 +44,7 @@ endif
|
|||
|
||||
ifeq ($(JANWARE_USER),)
|
||||
ifneq ($(wildcard $(JWBDIR)),)
|
||||
JANWARE_USER := $(shell /usr/bin/python3 $(JWBDIR)/scripts/jw-projects.py -p . projects get-auth-info --username --only-values)
|
||||
JANWARE_USER := $(shell /usr/bin/python3 $(JWBDIR)/scripts/jw-pkg.py -p . projects get-auth-info --username --only-values)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ ifeq ($(filter pkg-%,$(MAKECMDGOALS)),)
|
|||
endif
|
||||
|
||||
ifneq ($(EXCLUDE_FROM_BUILD),)
|
||||
PROJECTS_PY_EXTRA_BUILD_OPTS += --exclude "$(EXCLUDE_FROM_BUILD)"
|
||||
JW_PKG_PY_EXTRA_BUILD_OPTS += --exclude "$(EXCLUDE_FROM_BUILD)"
|
||||
endif
|
||||
|
||||
# non-interactive mode
|
||||
|
|
@ -116,8 +116,9 @@ ifeq ($(TIME),)
|
|||
TIME += -p
|
||||
endif
|
||||
endif
|
||||
PROJECTS_PY = $(TIME) python3 $(JWB_SCRIPT_DIR)/jw-projects.py --prefix $(shell pwd) $(PROJECTS_PY_EXTRA_OPTS) projects
|
||||
PROJECTS_PY_BUILD = $(PROJECTS_PY) build $(PROJECTS_PY_EXTRA_BUILD_OPTS)
|
||||
JW_PKG_PY = $(TIME) python3 $(JWB_SCRIPT_DIR)/jw-pkg.py --prefix $(shell pwd) $(JW_PKG_PY_EXTRA_OPTS)
|
||||
JW_PKG_PY_PROJECTS = $(JW_PKG_PY) projects
|
||||
JW_PKG_PY_BUILD = $(JW_PKG_PY_PRJECTS) build $(JW_PKG_PY_EXTRA_BUILD_OPTS)
|
||||
|
||||
PGIT_SH := /bin/bash $(JWB_SCRIPT_DIR)/pgit.sh
|
||||
ifneq ($(origin PROJECTS_DIR_REMOTE_BASE),undefined)
|
||||
|
|
@ -147,7 +148,7 @@ GIT_SRV_ADMIN_SH = JW_PKG_SSH_EXTRA_OPTS="$(JW_PKG_SSH_EXTRA_OPTS)"
|
|||
# ------------ projects to be built
|
||||
|
||||
TARGET_PROJECTS = $(filter-out $(EXCLUDE_FROM_BUILD),$(PROJECTS))
|
||||
BUILD_PROJECTS = $(shell $(PROJECTS_PY_BUILD) --build-order all $(TARGET_PROJECTS))
|
||||
BUILD_PROJECTS = $(shell $(JW_PKG_PY_BUILD) --build-order all $(TARGET_PROJECTS))
|
||||
GIT_PROJECTS = $(patsubst %/,%,$(dir $(wildcard $(addsuffix /.git,$(BUILD_PROJECTS)))))
|
||||
|
||||
# ------------ targets
|
||||
|
|
@ -155,7 +156,7 @@ GIT_PROJECTS = $(patsubst %/,%,$(dir $(wildcard $(addsuffix /.gi
|
|||
# --- mandatory targets
|
||||
|
||||
all: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
|
||||
$(PROJECTS_PY_BUILD) $@ $(TARGET_PROJECTS)
|
||||
$(JW_PKG_PY_BUILD) $@ $(TARGET_PROJECTS)
|
||||
clean: clean-dirs
|
||||
distclean: clean-all-dirs done.clean
|
||||
install:
|
||||
|
|
@ -180,18 +181,18 @@ help doc-project doc-module:
|
|||
status: $(SSH_WRAPPER_SH)
|
||||
|
||||
build-order-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
|
||||
$(PROJECTS_PY_BUILD) --build-order $* $(TARGET_PROJECTS) | sed 's/ */\n/g'
|
||||
$(JW_PKG_PY_BUILD) --build-order $* $(TARGET_PROJECTS) | sed 's/ */\n/g'
|
||||
|
||||
build-order: build-order-all
|
||||
|
||||
echo-build-deps:
|
||||
$(Q)$(PROJECTS_PY) required-os-pkg --skip-excluded --flavours "build" $(TARGET_PROJECTS)
|
||||
$(Q)$(JW_PKG_PY_PROJECTS) required-os-pkg --skip-excluded --flavours "build" $(TARGET_PROJECTS)
|
||||
|
||||
echo-install-deps:
|
||||
$(Q)$(PROJECTS_PY) required-os-pkg --skip-excluded --flavours "build run" $(TARGET_PROJECTS)
|
||||
$(Q)$(JW_PKG_PY_PROJECTS) required-os-pkg --skip-excluded --flavours "build run" $(TARGET_PROJECTS)
|
||||
|
||||
echo-release-deps:
|
||||
$(Q)$(PROJECTS_PY) required-os-pkg --skip-excluded --flavours "build run release" $(TARGET_PROJECTS)
|
||||
$(Q)$(JW_PKG_PY_PROJECTS) required-os-pkg --skip-excluded --flavours "build run release" $(TARGET_PROJECTS)
|
||||
echo-os:
|
||||
$(Q)$(GET_OS_SH)
|
||||
|
||||
|
|
@ -243,10 +244,10 @@ pkg-manager-refresh:
|
|||
$(PKG_MANAGER_SH) refresh $(DASH_Y)
|
||||
|
||||
pkg-install-build-deps:
|
||||
$(PKG_MANAGER_SH) install $(DASH_Y) "$(BASE_PKGS) $(shell $(PROJECTS_PY) required-os-pkg --skip-excluded --flavours build $(TARGET_PROJECTS))"
|
||||
$(PKG_MANAGER_SH) install $(DASH_Y) "$(BASE_PKGS) $(shell $(JW_PKG_PY_PROJECTS) required-os-pkg --skip-excluded --flavours build $(TARGET_PROJECTS))"
|
||||
|
||||
pkg-install-release-deps:
|
||||
$(PKG_MANAGER_SH) install $(DASH_Y) "$(BASE_PKGS) $(shell $(PROJECTS_PY) required-os-pkg --skip-excluded --flavours 'build run release' $(TARGET_PROJECTS))"
|
||||
$(PKG_MANAGER_SH) install $(DASH_Y) "$(BASE_PKGS) $(shell $(JW_PKG_PY_PROJECTS) required-os-pkg --skip-excluded --flavours 'build run release' $(TARGET_PROJECTS))"
|
||||
|
||||
pkg-release-reinstall: $(PREREQ_RELEASE)
|
||||
|
||||
|
|
@ -257,15 +258,15 @@ pkg-init-%:
|
|||
$(CREATE_PROJECT_SH) $*
|
||||
|
||||
pkg-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
|
||||
$(PROJECTS_PY_BUILD) $@ $(TARGET_PROJECTS)
|
||||
$(JW_PKG_PY_BUILD) $@ $(TARGET_PROJECTS)
|
||||
|
||||
# --- generic cleanup targets
|
||||
|
||||
clean-dirs:
|
||||
echo $(sort $(subst /,,$(dir $(wildcard */*.done)))) | xargs -r $(PROJECTS_PY_BUILD) clean
|
||||
echo $(sort $(subst /,,$(dir $(wildcard */*.done)))) | xargs -r $(JW_PKG_PY_BUILD) clean
|
||||
|
||||
clean-all-dirs:
|
||||
$(PROJECTS_PY_BUILD) clean $(PROJECTS)
|
||||
$(JW_PKG_PY_BUILD) clean $(PROJECTS)
|
||||
make clean-dirs
|
||||
|
||||
purge: $(SSH_WRAPPER_SH)
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ endif
|
|||
|
||||
include $(JWBDIR)/make/py-version.mk
|
||||
|
||||
|
||||
ifneq ($(TOPDIR),)
|
||||
proj_query_cmd = PYTHONPATH=$(JWBDIR)/src/python $(PYTHON) $(JWB_SCRIPT_DIR)/jw-projects.py -p $(PROJECTS_DIR) -t $(TOPDIR) --topdir-format absolute $(PROJECTS_PY_EXTRA_OPTS) projects
|
||||
JW_PKG_PY = PYTHONPATH=$(JWBDIR)/src/python $(PYTHON) $(JWB_SCRIPT_DIR)/jw-pkg.py -p $(PROJECTS_DIR) -t $(TOPDIR) --topdir-format absolute $(JW_PKG_PY_EXTRA_OPTS)
|
||||
proj_query_cmd = $(JW_PKG_PY) projects
|
||||
proj_query = $(shell $(proj_query_cmd) $(1))
|
||||
proj_dir = $(call proj_query,proj-dir $(1))
|
||||
htdocs_dir = $(call proj_query,htdocs-dir $(1))
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ git-update-project-description:
|
|||
ssh $(JANWARE_USER)@git.janware.com "/opt/jw-pkg/bin/git-srv-admin.sh $(OPT_JANWARE_PROJECT) update-descriptions $(PROJECT)"
|
||||
|
||||
projects-%:
|
||||
$(PYTHON) $(JWB_SCRIPT_DIR)/jw-projects.py projects build $* $(PROJECT)
|
||||
$(PYTHON) $(JWB_SCRIPT_DIR)/jw-pkg.py projects build $* $(PROJECT)
|
||||
|
||||
install-deps-devel:
|
||||
sudo zypper in $(shell echo $(RPM_REQUIRES_DEVEL) | sed "s/ *= */-/g; s/ [^ ]\+-__NEXT_VERSION__//")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue