diff --git a/make/projects-dir.mk b/make/projects-dir.mk index dffb70c5..552e95a7 100644 --- a/make/projects-dir.mk +++ b/make/projects-dir.mk @@ -55,6 +55,7 @@ EXCLUDES_FILES = $(wildcard exclude-$(shell $(GET_OS_SH) name 2>/d ifneq ($(EXCLUDES_FILES),) EXCLUDE_FROM_BUILD += $(shell sed 's/\#.*//g' $(EXCLUDES_FILES)) endif +OFFLINE_PROJECTS ?= $(EXCLUDE_FROM_BUILD) TEXT_FILES_CACHE ?= text-files.txt @@ -99,6 +100,10 @@ else export PGIT_CLONE_FROM_USER = $(JANWARE_USER) endif +ifneq ($(OFFLINE_PROJECTS),) + export PGIT_IGNORE = $(OFFLINE_PROJECTS) +endif + ifneq ($(EXCLUDE_FROM_BUILD),) PROJECTS_PY_EXTRA_BUILD_OPTS += --exclude "$(EXCLUDE_FROM_BUILD)" endif diff --git a/scripts/pgit.sh b/scripts/pgit.sh index 933ad564..94a4b6f2 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -113,6 +113,7 @@ clone() local toref=${refspec[2]} local login=$JANWARE_USER local projects="$PGIT_CLONE_PROJECTS" + local ignore="$PGIT_IGNORE" [ "$login" ] || login=`whoami` [ "$fromuser" ] || fromuser=`whoami` [ "$fromref" ] || fromref=master @@ -124,6 +125,9 @@ clone() n_projects=`echo $projects | wc -w` if [ "$PGIT_KEEP_GOING" != y ]; then set -e; fi for p in $projects; do + if echo $ignore | grep -q "\b$p\b"; then + continue + fi cur=`expr $cur + 1` local pullurl=ssh://$login@git.janware.com/srv/git/$fromuser/proj/$p local pushurl=ssh://$login@git.janware.com/srv/git/$login/proj/$p