Revision 614

Date:
2016/11/02 17:22:49
Author:
ahitrov
Revision Log:
New commands: core_rsync (crs), project_assets (assets), project_assets_dev (assdev), project_assets_rsync (ars)
for NodeJS and rsync features implementation.

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/GNUmakefile

     
    67 67 core_commit cci \
    68 68 core_install cin \
    69 69 core_info cinfo \
    70 core_rsync crs \
    70 71 \
    71 72 project_status pst \
    72 73 project_update pup \
     
    578 579 done;
    579 580 @echo $@ done
    580 581
    582 # rsync core static files directly to frontend
    583 crs: core_rsync ;
    584 core_rsync:: check_core_installed
    585 @for D in ${RSYNC_CORE_DIRS}; do \
    586 if [ -d ${RSYNC_CORE_ROOT}/$${D} ]; then \
    587 D=$${D}/; \
    588 elif [ \! -f ${RSYNC_CORE_ROOT}/$${D} ]; then \
    589 echo "ERROR: no such dir or file: ${RSYNC_CORE_ROOT}/$${D}"; \
    590 exit 1; \
    591 fi; \
    592 for S in ${RSYNC_SERVERS}; do \
    593 echo "#######################################"; \
    594 echo "# rsync $${D} to $${S}"; \
    595 echo "#######################################"; \
    596 cd ${RSYNC_CORE_ROOT} && ${RSYNC} -rtRv \
    597 --delete --delete-excluded --exclude .svn --chmod=u+w \
    598 $${D} $${S}; \
    599 echo -e "done\n"; \
    600 done; \
    601 done;
    602 @echo $@ done
    603
    604 assets: project_assets ;
    605 project_assets:: check_project
    606 @rm -rf ${ASSETS_ROOT}/assets;
    607 @cd ${PROJ_SRC}/${PROJECT} && echo ${PROJ_SRC}/${PROJECT} && \
    608 npm install;
    609 @cd ${PROJ_SRC}/${PROJECT} && npm run build;
    610 @if [ -d ${ASSETS_ROOT}/assets ]; then \
    611 echo "Assets generated in ${ASSETS_ROOT}/assets"; \
    612 fi;
    613 @echo $@ done
    614
    615 assdev: project_assets_dev ;
    616 project_assets_dev:: check_project
    617 @rm -rf ${ASSETS_ROOT}/assets;
    618 @cd ${PROJ_SRC}/${PROJECT} && echo ${PROJ_SRC}/${PROJECT} && \
    619 npm install;
    620 @cd ${PROJ_SRC}/${PROJECT} && npm run dev;
    621
    622 # rsync project assets directly to frontend
    623 ars: project_assets_rsync ;
    624 project_assets_rsync:: check_project
    625 @if [ -d ${ASSETS_ROOT}/assets ]; then \
    626 echo "Found assets in ${ASSETS_ROOT}/assets"; \
    627 for S in ${RSYNC_SERVERS}; do \
    628 echo "#######################################################"; \
    629 echo "# rsync ${ASSETS_ROOT}/assets to $${S}"; \
    630 echo "#######################################################"; \
    631 cd ${ASSETS_ROOT} && ${RSYNC} -rtRv \
    632 --delete --delete-excluded --exclude .svn --chmod=u+w \
    633 assets $${S}; \
    634 echo -e "done\n"; \
    635 done; \
    636 elif [ \! -f ${ASSETS_ROOT} ]; then \
    637 echo "ERROR: no such dir or file: ${ASSETS_ROOT}"; \
    638 exit 1; \
    639 fi;
    640 @echo $@ done
    641
    581 642 # start project
    582 643 start: project_start ;
    583 644 ifneq (${DISABLE},YES)
  • utf8/core/project-default.mk

     
    65 65 PREAMBLE_HANDLER_PATH ?=
    66 66
    67 67 RSYNC_DIRS ?=
    68 RSYNC_CORE_DIRS += contenido/i
    68 69
    69 70 # apache pool
    70 71 ${PROJECT_LC}_START_SERVERS ?= 1
     
    139 140 MASON_COMP ?= ${shell perl -e 'print lc "${DEVELOPMENT}" eq "yes" ? "${PROJ_SRC}" : "${PROJ_USR}"'}/${PROJECT}/comps
    140 141 CORE_COMP ?= ${shell perl -e 'print lc "${DEVELOPMENT}" eq "yes" ? "${CORE_SRC}" : "${CORE_USR}"'}/comps
    141 142 RSYNC_ROOT ?= ${PROJ_USR}/${PROJECT}/comps
    143 RSYNC_CORE_ROOT ?= ${CORE_USR}/comps
    144 ASSETS_ROOT ?= ${PROJ_VAR}/${PROJECT}
    142 145 BINARY ?= ${MASON_COMP}/binary
    143 146 ifdef FRONTENDS
    144 147 FILES ?= ${addprefix http://, ${addsuffix /dav/${PROJECT_LC}, ${FRONTENDS}}}