Remove mango_cursor_text.erl from path if dreyfus does not exist We create a new rebar.config.script for mango to rename mango_cursor_text.erl so that compilation does not fail. If users want to enable text search, they will manually have to clone dreyfus and re-add the file (will be in README).
COUCHDB-2787 Project: http://git-wip-us.apache.org/repos/asf/couchdb-mango/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mango/commit/805fee5b Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mango/tree/805fee5b Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mango/diff/805fee5b Branch: refs/heads/master Commit: 805fee5bec5e1a8970503cbae7c1b7c8097d2ad5 Parents: 8d496c1 Author: Tony Sun <tony....@cloudant.com> Authored: Wed Sep 2 11:08:39 2015 -0700 Committer: Tony Sun <tony....@cloudant.com> Committed: Wed Sep 2 11:08:39 2015 -0700 ---------------------------------------------------------------------- rebar.config.script | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-mango/blob/805fee5b/rebar.config.script ---------------------------------------------------------------------- diff --git a/rebar.config.script b/rebar.config.script new file mode 100644 index 0000000..02604f9 --- /dev/null +++ b/rebar.config.script @@ -0,0 +1,27 @@ +% Licensed under the Apache License, Version 2.0 (the "License"); you may not +% use this file except in compliance with the License. You may obtain a copy of +% the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +% License for the specific language governing permissions and limitations under +% the License. + +DreyfusAppFile = filename:join(filename:dirname(SCRIPT), + "../dreyfus/src/dreyfus.app.src"), +CursorFile = filename:join(filename:dirname(SCRIPT), + "src/mango_cursor_text.erl"), +RenameFile = filename:join(filename:dirname(SCRIPT), + "src/mango_cursor_text.nocompile"), + +case filelib:is_regular(DreyfusAppFile) of + true -> + ok; + false -> + file:rename(CursorFile, RenameFile) +end, + +CONFIG. \ No newline at end of file