1
0
Fork 0

fixed packaging of JS files

This commit is contained in:
Frank Celler 2015-07-04 21:50:49 +02:00
parent b38e0fb9c7
commit b6995ba412
7 changed files with 80 additions and 77 deletions

View File

@ -125,6 +125,8 @@ pack-dmg-cmake:
cd Build && ${MAKE}
./Installation/file-copy-js.sh . Build
cd Build && cpack \
-G Bundle \
-D "CPACK_INSTALL_PREFIX=${DMG_NAME}/Contents/MacOS/opt/arangodb"
@ -247,6 +249,8 @@ pack-arm-cmake:
cd Build && ${MAKE}
./Installation/file-copy-js.sh . Build
cd Build && cpack \
-G DEB
@ -274,6 +278,8 @@ pack-deb-cmake:
cd Build && ${MAKE}
./Installation/file-copy-js.sh . Build
cd Build && cpack \
-G DEB
################################################################################
@ -329,6 +335,8 @@ winXX-build:
cd Build$(BITS) && cmake --build . --config $(BUILD_TARGET)
packXX:
./Installation/file-copy-js.sh . Build$(BITS)
cd Build$(BITS) && cpack -G NSIS && cpack -G ZIP
./Installation/Windows/installer-generator.sh $(BITS) $(shell pwd)

19
Installation/file-copy-js.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
set -e
SRCDIR=$1
DSTDIR=$2
${SRCDIR}/Installation/file-list-js.sh ${SRCDIR} | while read a; do
if test -f "$DSTDIR/$a"; then
echo "$DSTDIR/$a: already exists, giving up"
exit 1
fi
FROM="${SRCDIR}/$a"
TO="${DSTDIR}/$a"
DIR=`dirname "${TO}"`
test -d "${DIR}" || mkdir -p "${DIR}"
cp -n "${FROM}" "${TO}"
done

30
Installation/file-list-js.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
SRCDIR=$1
(
cd ${SRCDIR}
find \
js/actions \
js/apps/system/_admin \
js/apps/system/_api \
js/apps/system/_system \
js/client \
js/common \
js/node \
js/server \
\
-type f -print
) \
| egrep -v "^js/common/tests/" \
| egrep -v "^js/common/test-data/" \
| egrep -v "^js/client/tests/" \
| egrep -v "^js/client/test-data/" \
| egrep -v "^js/server/tests/" \
| egrep -v "^js/server/test-data/" \
| egrep -v "^js/apps/system/admin/.*/node_modules/" \
| egrep -v "^js/apps/system/.*/test/" \
| egrep -v "^js/apps/system/.*/test_data/" \
| egrep -v "^js/apps/system/.*/coverage/" \

View File

@ -224,40 +224,22 @@ arangosysconf_DATA = $(shell find @builddir@/etc/arangodb -name "*$(PROGRAM_SUFF
### @brief /share data
################################################################################
pkgdataACTIONSdir = $(datadir)/arangodb
pkgdataCOMMONdir = $(datadir)/arangodb
pkgdataSERVERdir = $(datadir)/arangodb
pkgdataSWAGGERdir = $(datadir)/arangodb
pkgdataCLIENTdir = $(datadir)/arangodb
pkgdataNODE1dir = $(datadir)/arangodb
pkgdataNODE2dir = $(datadir)/arangodb
pkgdataNODE3dir = $(datadir)/arangodb
pkgdataAPPSdir = $(datadir)/arangodb
pkgdataAPPSADMINdir = $(datadir)/arangodb
pkgdataAPPSAPIdir = $(datadir)/arangodb
pkgdataAPPSSYSTEMdir = $(datadir)/arangodb
JS_FILE_LIST = $(shell @srcdir@/Installation/file-list-js.sh @srcdir@)
pkgdataJS1dir = $(datadir)/arangodb
pkgdataJS2dir = $(datadir)/arangodb
pkgdataJS3dir = $(datadir)/arangodb
pkgdataJS4dir = $(datadir)/arangodb
pkgdataJS5dir = $(datadir)/arangodb
nobase_pkgdataJS1_DATA = $(wordlist 1, 1000, $(JS_FILE_LIST))
nobase_pkgdataJS2_DATA = $(wordlist 1001, 2000, $(JS_FILE_LIST))
nobase_pkgdataJS3_DATA = $(wordlist 2001, 3000, $(JS_FILE_LIST))
nobase_pkgdataJS4_DATA = $(wordlist 3001, 4000, $(JS_FILE_LIST))
nobase_pkgdataJS5_DATA = $(wordlist 4001, 100000, $(JS_FILE_LIST))
nobase_pkgdata_DATA =
# -o has short cut evaluation, thus the following command filters out
# files with name .travis.yml and .npmignore
NODE_DATA_LIST = $(shell find @srcdir@/js/node -type f "(" -name .travis.yml -o -name .npmignore -o -print ")" | grep -v "\(htmlparser2\|js-yaml\)/test/")
nobase_pkgdataACTIONS_DATA = $(shell find @srcdir@/js/actions -name "*.js" -print)
nobase_pkgdataCOMMON_DATA = $(shell find @srcdir@/js/common -name "*.js" -print)
nobase_pkgdataSERVER_DATA = $(shell find @srcdir@/js/server -name assets -prune -o "(" -name "*.js" -o -name "*.tmpl" ")" -print)
nobase_pkgdataSWAGGER_DATA = $(shell find @srcdir@/js/server/assets -type f -print)
nobase_pkgdataCLIENT_DATA = $(shell find @srcdir@/js/client -name "*.js" -print)
nobase_pkgdataNODE1_DATA = $(wordlist 1, 1000, $(NODE_DATA_LIST))
nobase_pkgdataNODE2_DATA = $(wordlist 1001, 2000, $(NODE_DATA_LIST))
nobase_pkgdataNODE3_DATA = $(wordlist 2001, 100000, $(NODE_DATA_LIST))
# note: we want to exclude node_modules from aardvark because they are only needed by grunt and not to run aardvark
nobase_pkgdataAPPSADMIN_DATA = $(shell find @srcdir@/js/apps/system/_admin -type f "(" -path "*/node_modules/*" -o -path "*/test/*" -o -path "*/test_data/*" -o -path "*/coverage/*" -o -print ")")
nobase_pkgdataAPPSAPI_DATA = $(shell find @srcdir@/js/apps/system/_api -type f "(" -path "*/test/*" -o -path "*/test_data/*" -o -path "*/coverage/*" -o -print ")")
nobase_pkgdataAPPSSYSTEM_DATA = $(shell find @srcdir@/js/apps/system/_system -type f "(" -path "*/test/*" -o -path "*/test_data/*" -o -path "*/coverage/*" -o -print ")")
################################################################################
### @brief /var data
################################################################################
@ -283,23 +265,6 @@ install-exec-hook:
rm -f $(DESTDIR)$(sbindir)/arango-dfdb$(PROGRAM_SUFFIX)
$(LN_S) arangod$(PROGRAM_SUFFIX) $(DESTDIR)$(sbindir)/arango-dfdb$(PROGRAM_SUFFIX)
################################################################################
### @brief cleanup empty files
################################################################################
install-data-hook:
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/docco/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/c
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/docco/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/d
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/docco/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/e
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/docco/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/f
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/docco/node_modules/fs-extra/node_modules/ncp/test/fixtures/src/sub/b
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/joi/node_modules/hoek/test/modules/ignore.txt
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/docco/node_modules/fs-extra/node_modules/rimraf/test/setup.sh
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/joi/node_modules/isemail/dns-no-mx.js
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/docco/node_modules/fs-extra/node_modules/rimraf/test/run.sh
rm -f $(DESTDIR)$(pkgdataNODEdir)/js/node/node_modules/docco/node_modules/fs-extra/node_modules/rimraf/test/run.sh
## -----------------------------------------------------------------------------
## --SECTION-- TARGETS
## -----------------------------------------------------------------------------

View File

@ -234,35 +234,8 @@ install_config(arango-dfdb)
################################################################################
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/js/common ${PROJECT_SOURCE_DIR}/js/server ${PROJECT_SOURCE_DIR}/js/actions
DESTINATION share/arangodb/js
FILES_MATCHING PATTERN "*.js" PATTERN "*.tmpl" PATTERN "*.html" PATTERN "*.css" PATTERN "droid*" PATTERN "*png"
REGEX "^.*/common/test-data$" EXCLUDE
REGEX "^.*/common/tests$" EXCLUDE
REGEX "^.*/server/tests$" EXCLUDE)
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/js/node
DESTINATION share/arangodb/js
REGEX ".travis.yml" EXCLUDE
REGEX ".npmignore" EXCLUDE
PATTERN "_db" EXCLUDE)
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/js/apps/system/_admin
DESTINATION share/arangodb/js/apps/system
REGEX "/node_modules/" EXCLUDE
REGEX "/test/" EXCLUDE
REGEX "/test_data/" EXCLUDE
REGEX "/coverage/" EXCLUDE
PATTERN "_db" EXCLUDE)
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/js/apps/system/_api ${PROJECT_SOURCE_DIR}/js/apps/system/_system
DESTINATION share/arangodb/js/apps/system
REGEX "/test/" EXCLUDE
REGEX "/test_data/" EXCLUDE
PATTERN "_db" EXCLUDE)
DIRECTORY ${PROJECT_BINARY_DIR}/js
DESTINATION share/arangodb/js)
################################################################################
### @brief install log directory

View File

@ -54,5 +54,9 @@
"_shasum": "0ba5ec2a885640e470ea4e8505971900dac58822",
"_resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
"readme": "ERROR: No README data found!",
<<<<<<< Updated upstream
"homepage": "https://github.com/chaijs/type-detect#readme"
=======
"homepage": "https://github.com/chaijs/type-detect"
>>>>>>> Stashed changes
}

View File

@ -61,5 +61,9 @@
"_shasum": "ef558acab8de25206cd713906d74e56930eb69f2",
"_resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
"readme": "ERROR: No README data found!",
<<<<<<< Updated upstream
"homepage": "https://github.com/chaijs/deep-eql#readme"
=======
"homepage": "https://github.com/chaijs/deep-eql"
>>>>>>> Stashed changes
}