mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into spdvpk
This commit is contained in:
commit
333bda5df1
|
@ -1,12 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief JavaScript base module
|
||||
///
|
||||
/// @file
|
||||
///
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
|
||||
/// Copyright 2012 triagens GmbH, Cologne, Germany
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -21,20 +18,18 @@
|
|||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
/// Copyright holder is triAGENS GmbH, Cologne, Germany
|
||||
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
///
|
||||
/// @author Dr. Frank Celler
|
||||
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var internal = require("internal");
|
||||
var common = require("@arangodb/common");
|
||||
|
||||
Object.keys(common).forEach(function (key) {
|
||||
Object.keys(common).forEach(function(key) {
|
||||
exports[key] = common[key];
|
||||
});
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief isServer
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -90,8 +85,7 @@ if (typeof internal.arango !== 'undefined') {
|
|||
exports.arango = internal.arango;
|
||||
exports.db = new exports.ArangoDatabase(internal.arango);
|
||||
internal.db = exports.db; // TODO remove
|
||||
}
|
||||
catch (err) {
|
||||
} catch (err) {
|
||||
internal.print("cannot connect to server: " + String(err));
|
||||
}
|
||||
}
|
||||
|
@ -103,17 +97,20 @@ if (typeof internal.arango !== 'undefined') {
|
|||
exports.plainServerVersion = function() {
|
||||
if (internal.arango) {
|
||||
let version = internal.arango.getVersion();
|
||||
let devel = version.match(/(.*)-((alpha|beta|devel|rc)[0-9]*)$/);
|
||||
let devel = version.match(/(.*)\.x-devel/);
|
||||
|
||||
if (devel !== null) {
|
||||
version = devel[1];
|
||||
version = devel[1] + ".0";
|
||||
} else {
|
||||
devel = version.match(/(.*)-((alpha|beta|devel|rc)[0-9]*)$/);
|
||||
|
||||
if (devel !== null) {
|
||||
version = devel[1];
|
||||
}
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
/// @author Copyright 2013, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
const _ = require('lodash');
|
||||
const fs = require('fs');
|
||||
const joi = require('joi');
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief JavaScript base module
|
||||
///
|
||||
/// @file
|
||||
///
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
|
||||
/// Copyright 2012 triagens GmbH, Cologne, Germany
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -21,17 +18,16 @@
|
|||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
/// Copyright holder is triAGENS GmbH, Cologne, Germany
|
||||
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
///
|
||||
/// @author Dr. Frank Celler
|
||||
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
module.isSystem = true;
|
||||
|
||||
var common = require("@arangodb/common");
|
||||
|
||||
Object.keys(common).forEach(function (key) {
|
||||
Object.keys(common).forEach(function(key) {
|
||||
exports[key] = common[key];
|
||||
});
|
||||
|
||||
|
@ -39,7 +35,6 @@ var internal = require("internal"); // OK: db
|
|||
|
||||
var ShapedJson = require("@arangodb/shaped-json").ShapedJson;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief isServer
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -91,13 +86,17 @@ exports.db = internal.db;
|
|||
|
||||
exports.plainServerVersion = function() {
|
||||
let version = internal.version;
|
||||
let devel = version.match(/(.*)-((alpha|beta|devel|rc)[0-9]*)$/);
|
||||
let devel = version.match(/(.*)\.x-devel/);
|
||||
|
||||
if (devel !== null) {
|
||||
version = devel[1];
|
||||
version = devel[1] + ".0";
|
||||
} else {
|
||||
devel = version.match(/(.*)-((alpha|beta|devel|rc)[0-9]*)$/);
|
||||
|
||||
if (devel !== null) {
|
||||
version = devel[1];
|
||||
}
|
||||
}
|
||||
|
||||
return version;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
run
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
export PID=$$
|
||||
|
||||
if test -n "$ORIGINAL_PATH"; then
|
||||
# running in cygwin...
|
||||
PS='\'
|
||||
export EXT=".exe"
|
||||
else
|
||||
export EXT=""
|
||||
PS='/'
|
||||
fi;
|
||||
|
||||
SCRIPT="utils${PS}generateExamples.js"
|
||||
LOGFILE="out${PS}log-$PID"
|
||||
DBDIR="out${PS}data-$PID"
|
||||
|
||||
mkdir -p ${DBDIR}
|
||||
|
||||
echo Database has its data in ${DBDIR}
|
||||
echo Logfile is in ${LOGFILE}
|
||||
|
||||
if [ -z "${ARANGOD}" ]; then
|
||||
if [ -x build/bin/arangod ]; then
|
||||
ARANGOD=build/bin/arangod
|
||||
elif [ -x bin/arangosh ]; then
|
||||
ARANGOD=bin/arangod
|
||||
else
|
||||
echo "$0: cannot locate arangod"
|
||||
fi
|
||||
fi
|
||||
|
||||
${ARANGOD} \
|
||||
--configuration none \
|
||||
--cluster.agent-path bin${PS}etcd-arango${EXT} \
|
||||
--cluster.arangod-path bin${PS}arangod \
|
||||
--cluster.coordinator-config etc${PS}relative${PS}arangod-coordinator.conf \
|
||||
--cluster.dbserver-config etc${PS}relative${PS}arangod-dbserver.conf \
|
||||
--cluster.disable-dispatcher-frontend false \
|
||||
--cluster.disable-dispatcher-kickstarter false \
|
||||
--cluster.data-path cluster \
|
||||
--cluster.log-path cluster \
|
||||
--database.directory ${DBDIR} \
|
||||
--log.file ${LOGFILE} \
|
||||
--server.endpoint tcp://127.0.0.1:$PORT \
|
||||
--javascript.startup-directory js \
|
||||
--javascript.app-path js${PS}apps \
|
||||
--javascript.script $SCRIPT \
|
||||
--no-server \
|
||||
--temp-path ${PS}var${PS}tmp \
|
||||
"${ARGS[@]}" \
|
||||
|
||||
if test $? -eq 0; then
|
||||
echo "removing ${LOGFILE} ${DBDIR}"
|
||||
rm -rf ${LOGFILE} ${DBDIR}
|
||||
else
|
||||
echo "failed - don't remove ${LOGFILE} ${DBDIR} - here's the logfile:"
|
||||
cat ${LOGFILE}
|
||||
fi
|
||||
|
||||
echo Server has terminated.
|
|
@ -18,17 +18,12 @@ var PortFinder = require("@arangodb/cluster").PortFinder;
|
|||
|
||||
var documentationSourceDirs = [
|
||||
fs.join(fs.makeAbsolute(''), "Documentation/Examples/setup-arangosh.js"),
|
||||
fs.join(fs.makeAbsolute(''), "Documentation/Books/Users"),
|
||||
fs.join(fs.makeAbsolute(''), "js/actions"),
|
||||
fs.join(fs.makeAbsolute(''), "js/client"),
|
||||
fs.join(fs.makeAbsolute(''), "js/common"),
|
||||
fs.join(fs.makeAbsolute(''), "js/server"),
|
||||
fs.join(fs.makeAbsolute(''), "js/apps/system/_api/gharial/APP"),
|
||||
fs.join(fs.makeAbsolute(''), "Documentation/Books/Users"),
|
||||
fs.join(fs.makeAbsolute(''), "arangod/RestHandler"),
|
||||
fs.join(fs.makeAbsolute(''), "arangod/V8Server")];
|
||||
|
||||
|
||||
|
||||
fs.join(fs.makeAbsolute(''), "js/apps/system/_api/gharial/APP")];
|
||||
|
||||
var theScript = 'Documentation/Scripts/generateExamples.py';
|
||||
|
Loading…
Reference in New Issue