summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2017-03-22 11:50:10 +0100
committerJan Lehnardt <jan@apache.org>2017-04-01 19:41:36 +0200
commitf4c6113808d1809469df9c8be9d2f83ef399f064 (patch)
tree33b09f34f874f51c687400ee76d98befd0dd0069
parentbb187a22a098f156082cd7b66a492bff7f49baa2 (diff)
downloadcouchdb-f4c6113808d1809469df9c8be9d2f83ef399f064.tar.gz
feat: monorepo fixes
-rw-r--r--.gitignore116
-rwxr-xr-xbuild-aux/couchdb-build-release.sh9
-rwxr-xr-xconfigure3
-rw-r--r--rebar.config.script74
-rw-r--r--src/couch/rebar.config.script4
-rw-r--r--src/fabric/rebar.config2
-rw-r--r--src/mango/rebar.config.script12
-rw-r--r--src/mango/src/mango_cursor_text.erl.nocompile (renamed from src/mango/src/mango_cursor_text.erl)0
8 files changed, 151 insertions, 69 deletions
diff --git a/.gitignore b/.gitignore
index 91b375f17..c6c3942ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,35 +1,107 @@
+*.o
+*.pyc
+*.snap
+*.so
.DS_Store
-
+.rebar
+log
+apache-couchdb-*/
+bin/
config.erl
+dev/boot_node.beam
+dev/lib/
+dev/logs/
+ebin/
+erl_crash.dump
install.mk
rel/*.config
rel/dev*
rel/tmpdata
-src/
-/log
-tmp/
-
-*.o
-*.so
-*.pyc
-ebin/
-
-erl_crash.dump
-
-dev/boot_node.beam
-dev/lib/
-dev/logs/
-
share/server/main-coffee.js
share/server/main.js
share/www
-
+src/b64url/
+src/bear/
+src/config/
src/couch/priv/couch_js/config.h
src/couch/priv/couchjs
src/couch/priv/couchspawnkillable
+src/couch/priv/couch_ejson_compare/couch_ejson_compare.d
+src/couch/priv/couch_js/http.d
+src/couch/priv/couch_js/main.d
+src/couch/priv/couch_js/utf8.d
+src/couch/priv/couch_js/util.d
+src/couch/priv/icu_driver/couch_icu_driver.d
+src/mango/src/mango_cursor_text.nocompile
+src/docs/
+src/ets_lru/
+src/fauxton/
+src/folsom/
+src/ibrowse/
+src/ioq/
+src/jiffy/
+src/khash/
+src/meck/
+src/mochiweb/
+src/oauth/
+src/rebar/
+src/setup/
+src/snappy/
+tmp/
-.rebar
-bin/
-apache-couchdb-*/
-
-*.snap
+src/couch/*.o
+src/couch/*.so
+src/couch/ebin/
+src/couch/priv/couch_js/config.h
+src/couch/priv/couchjs
+src/couch/priv/couchspawnkillable
+src/couch/priv/*.exp
+src/couch/priv/*.lib
+src/couch/priv/*.dll
+src/couch/priv/*.exe
+src/couch/vc120.pdb
+src/couch/.rebar/
+src/couch/.eunit
+src/couch_epi/.rebar
+src/couch_epi/ebin
+src/couch_epi/erl_crash.dump
+src/couch_epi/.eunit
+src/couch_event/deps/
+src/couch_event/ebin/
+src/couch_index/ebin
+src/couch_index/.eunit
+src/couch_index/.rebar
+src/couch_log/ebin
+src/couch_log/.eunit
+src/couch_log/.rebar
+src/couch_peruser/.eunit
+src/couch_peruser/doc
+src/couch_peruser/ebin
+src/couch_peruser/deps
+src/couch_peruser/.rebar
+src/couch_peruser/couchperuser-*
+src/couch_peruser/erl_crash.dump
+src/couch_peruser/TEST-*.xml
+src/couch_peruser/*.beam
+src/couch_replicator/*.beam
+src/couch_replicator/.eunit
+src/couch_replicator/ebin/replicator.app
+src/couch_replicator/.DS_Store
+src/couch_stats/*~
+src/couch_stats/*.beam
+src/couch_stats/deps
+src/couch_stats/ebin
+src/couch_stats/doc
+src/couch_stats/.project
+src/couch_tests/*.o
+src/couch_tests/*.so
+src/couch_tests/ebin/
+src/couch_tests/.rebar/
+src/couch_tests/.eunit
+src/global_changes/.eunit/
+src/global_changes/ebin/
+src/mango/.rebar/
+src/mango/ebin/
+src/mango/test/*.pyc
+src/mango/venv/
+src/mango/.eunit
diff --git a/build-aux/couchdb-build-release.sh b/build-aux/couchdb-build-release.sh
index 4cea72a7c..4482b713c 100755
--- a/build-aux/couchdb-build-release.sh
+++ b/build-aux/couchdb-build-release.sh
@@ -18,14 +18,15 @@ CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
# copy sources over
git archive $CURRENT_BRANCH | tar -xC $RELDIR/ -f -
-mkdir $RELDIR/src
cd src/
for repo in *; do
cd $repo
- mkdir ../../$RELDIR/src/$repo
- git_ish=`git rev-parse --short HEAD`
- git archive $git_ish | tar --exclude '*do_not_compile.erl' -xC ../../$RELDIR/src/$repo/ -f -
+ if [ -d ".git" ]; then
+ mkdir -p ../../$RELDIR/src/$repo
+ git_ish=`git rev-parse --short HEAD`
+ git archive $git_ish | tar --exclude '*do_not_compile.erl' -xC ../../$RELDIR/src/$repo/ -f -
+ fi
set +e
grep -rl '{vsn, git}' ../../$RELDIR/src/$repo/ | xargs sed -ie "s/{vsn, git}/{vsn, \"`git describe --always --tags`\"}/" 2> /dev/null
set -e
diff --git a/configure b/configure
index 4a8a352c0..10c688e39 100755
--- a/configure
+++ b/configure
@@ -191,7 +191,7 @@ EOF
install_local_rebar() {
if [ ! -x "${rootdir}/bin/rebar" ]; then
if [ ! -d "${rootdir}/src/rebar" ]; then
- git clone --depth 1 --branch 2.6.0 https://git-wip-us.apache.org/repos/asf/couchdb-rebar.git ${rootdir}/src/rebar
+ git clone --depth 1 --branch 2.6.0 https://github.com/apache/couchdb-rebar.git ${rootdir}/src/rebar
fi
make -C ${rootdir}/src/rebar
mv ${rootdir}/src/rebar/rebar ${rootdir}/bin/rebar
@@ -205,7 +205,6 @@ if [ -z "${REBAR}" ]; then
REBAR=${rootdir}/bin/rebar
fi
-
# only update dependencies, when we are not in a release tarball
if [ -d .git -a $SKIP_DEPS -ne 1 ]; then
echo "==> updating dependencies"
diff --git a/rebar.config.script b/rebar.config.script
index bf5cf55e5..75f3631e9 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -21,47 +21,57 @@ os:putenv("COUCHDB_CONFIG", ConfigureEnv).
os:putenv("COUCHDB_APPS_CONFIG_DIR", filename:join([COUCHDB_ROOT, "rel/apps"])).
+SubDirs = [
+ %% must be compiled first as it has a custom behavior
+ "src/couch_epi",
+ "src/couch_log",
+ "src/chttpd",
+ "src/couch",
+ "src/couch_index",
+ "src/couch_mrview",
+ "src/couch_replicator",
+ "src/couch_plugins",
+ "src/couch_event",
+ "src/couch_stats",
+ "src/couch_peruser",
+ "src/couch_tests",
+ "src/ddoc_cache",
+ "src/fabric",
+ "src/global_changes",
+ "src/mango",
+ "src/mem3",
+ "src/rexi",
+ "rel"
+],
+
DepDescs = [
-%% must be compiled first as it has a custom behavior
-{couch_epi, "couch-epi", "60e7f808513b2611eb412cf641d6e7132dda2a30"},
+%% Independent Apps
{config, "config", "f62d553b337ce975edb0fb68772d22bdd3bf6490"},
-%% keep these sorted
{b64url, "b64url", "6895652d80f95cdf04efb14625abed868998f174"},
-{couch_log, "couch-log", "194db1adeafd9d5b434ae22b06aecdcb8635863e"},
-{chttpd, "chttpd", "74002101513c03df74a4c25f3c892f5d003fa5da"},
-{couch, "couch", "21c8d37ac6ee1a7fed1de1f54f95a4d3cd9f5248"},
-{couch_index, "couch-index", "f0a6854e578469612937a766632fdcdc52ee9c65"},
-{couch_mrview, "couch-mrview", "3c70ae90ba6b45fb86641b88fca0d88059121d34"},
-{couch_replicator, "couch-replicator", "d00b981445c03622497088eb872059ab4f48b298"},
-{couch_plugins, "couch-plugins", "3e73b723cb126cfc471b560d17c24a8b5c540085"},
-{couch_event, "couch-event", "7e382132219d708239306aa3591740694943d367"},
-{couch_stats, "couch-stats", "7895d4d3f509ed24f09b6d1a0bd0e06af34551dc"},
-{couch_peruser, "peruser", "4eea9571171a5b41d832da32204a1122a01f4b0e"},
-{couch_tests, "erlang-tests", "37b3bfeb4b1a48a592456e67991362e155ed81e0"},
+{ets_lru, "ets-lru", "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
+{khash, "khash", "7c6a9cd9776b5c6f063ccafedfa984b00877b019"},
+{snappy, "snappy", "a728b960611d0795025de7e9668d06b9926c479d"},
+{setup, "setup", "e8d1e32ba3b4f5f3be0e06e5269b12d811f24d52"},
+{ioq, "ioq", "1d2b149ee12dfeaf8d89a67b2f937207f4c5bdf2"},
+
+%% Non-Erlang deps
{docs, {url, "https://github.com/apache/couchdb-documentation"},
"3b15a7cb5e1958bc71ac865b56d3081ab43f5942", [raw]},
-{ddoc_cache, "ddoc-cache", "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
-{ets_lru, "ets-lru", "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
-{fabric, "fabric", "ce62148d0a4469751d8078cc223684da29b5d4a7"},
{fauxton, {url, "https://github.com/apache/couchdb-fauxton"},
- {tag, "v1.1.11"}, [raw]},
+ {tag, "v1.1.11"}, [raw]},
+%% Third party deps
{folsom, "folsom", "a5c95dec18227c977029fbd3b638966d98f17003"},
-{global_changes, "global-changes", "f6e4c5629a7d996d284e4489f1897c057823f846"},
{ibrowse, "ibrowse", "4af2d408607874d124414ac45df1edbe3961d1cd"},
-{ioq, "ioq", "1d2b149ee12dfeaf8d89a67b2f937207f4c5bdf2"},
{jiffy, "jiffy", "d3c00e19d8fa20c21758402231247602190988d3"},
-{khash, "khash", "7c6a9cd9776b5c6f063ccafedfa984b00877b019"},
-{mango, "mango", "4afd60e84d0e1c57f5d6a1e3542955faa565ca4b"},
-{mem3, "mem3", "c3c5429180de14a2b139f7741c934143ef73988c"},
{mochiweb, "mochiweb", "bd6ae7cbb371666a1f68115056f7b30d13765782"},
-{oauth, "oauth", "099057a98e41f3aff91e77e3cf496d6c6fd901df"},
-{rexi, "rexi", "a327b7dbeb2b0050f7ca9072047bf8ef2d282833"},
-{snappy, "snappy", "a728b960611d0795025de7e9668d06b9926c479d"},
-{setup, "setup", "e8d1e32ba3b4f5f3be0e06e5269b12d811f24d52"},
-{meck, "meck", {tag, "0.8.2"}}
+{meck, "meck", {tag, "0.8.2"}},
+
+%% Deprecated
+{oauth, "oauth", "099057a98e41f3aff91e77e3cf496d6c6fd901df"}
],
-BaseUrl = "https://git-wip-us.apache.org/repos/asf/",
+
+BaseUrl = "https://github.com/apache/",
MakeDep = fun
({AppName, {url, Url}, Version}) ->
@@ -80,9 +90,9 @@ AddConfig = [
{require_otp_vsn, "R16B03|R16B03-1|17|18|19"},
{deps_dir, "src"},
{deps, lists:map(MakeDep, DepDescs)},
- {sub_dirs, ["rel"]},
- {lib_dirs, ["src/"]},
- {erl_opts, [debug_info]},
+ {sub_dirs, SubDirs},
+ {lib_dirs, ["src"]},
+ {erl_opts, [debug_info, {i, "../"}]},
{eunit_opts, [verbose]},
{plugins, [eunit_plugin]},
{dialyzer, [
diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script
index 8d4409905..5586032d9 100644
--- a/src/couch/rebar.config.script
+++ b/src/couch/rebar.config.script
@@ -136,7 +136,8 @@ AddConfig = [
{port_specs, PortSpecs},
{erl_opts, [
{platform_define, "win32", 'WINDOWS'},
- {d, 'COUCHDB_VERSION', Version}
+ {d, 'COUCHDB_VERSION', Version},
+ {i, "../"}
]},
{eunit_compile_opts, [{platform_define, "win32", 'WINDOWS'}]}
].
@@ -144,4 +145,3 @@ AddConfig = [
lists:foldl(fun({K, V}, CfgAcc) ->
lists:keystore(K, 1, CfgAcc, {K, V})
end, CONFIG, AddConfig).
-
diff --git a/src/fabric/rebar.config b/src/fabric/rebar.config
index 7104d3b63..ccfb9b435 100644
--- a/src/fabric/rebar.config
+++ b/src/fabric/rebar.config
@@ -11,5 +11,5 @@
% the License.
{deps, [
- {meck, ".*", {git, "https://git-wip-us.apache.org/repos/asf/couchdb-meck.git", {tag, "0.8.2"}}}
+ {meck, ".*", {git, "https://github.com/apache/couchdb-meck.git", {tag, "0.8.2"}}}
]}.
diff --git a/src/mango/rebar.config.script b/src/mango/rebar.config.script
index 02604f965..3b046f4b9 100644
--- a/src/mango/rebar.config.script
+++ b/src/mango/rebar.config.script
@@ -12,16 +12,16 @@
DreyfusAppFile = filename:join(filename:dirname(SCRIPT),
"../dreyfus/src/dreyfus.app.src"),
-CursorFile = filename:join(filename:dirname(SCRIPT),
+RenameFile = filename:join(filename:dirname(SCRIPT),
"src/mango_cursor_text.erl"),
-RenameFile = filename:join(filename:dirname(SCRIPT),
- "src/mango_cursor_text.nocompile"),
+CursorFile = filename:join(filename:dirname(SCRIPT),
+ "src/mango_cursor_text.erl.nocompile"),
case filelib:is_regular(DreyfusAppFile) of
true ->
- ok;
+ file:rename(CursorFile, RenameFile);
false ->
- file:rename(CursorFile, RenameFile)
+ ok
end,
-CONFIG. \ No newline at end of file
+CONFIG.
diff --git a/src/mango/src/mango_cursor_text.erl b/src/mango/src/mango_cursor_text.erl.nocompile
index a094b5528..a094b5528 100644
--- a/src/mango/src/mango_cursor_text.erl
+++ b/src/mango/src/mango_cursor_text.erl.nocompile