summaryrefslogtreecommitdiff
path: root/rebar.config.script
blob: 63e15d3e53c5c795daf4a57c54174831881391cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
% 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.

% Set the path to the configuration environment generated
% by `./configure`.
ConfigureEnv = filename:join(filename:dirname(SCRIPT), "config.erl"),
os:putenv("COUCHDB_CONFIG", ConfigureEnv).


DepDescs = [
{b64url,           "b64url",           "319fc604235ab1fde37047b38a432450161db750"},
{cassim,           "cassim",           "1ae21f7c415acf3d1aba8b4924ca3093014b86b1"},
{couch_log,        "couch-log",        "7e615ac1b27c61e63b2b8015800ed51ece0f7ad3"},
{couch_log_lager,  "couch-log-lager",  "64cd100cb566ce93af9ef168fa86f9f70424b77b"},
{config,           "config",           "b2ecd0d47a776256956ce045123423494ff85e8e"},
{chttpd,           "chttpd",           "64a5728152ea0a17dd71f133241ef47575fdf98a"},
{couch,            "couch",            "9afa6a0979c37f4dfb72deb1c7d26aadd1aec694"},
{couch_epi,        "couch-epi",        "aa72f6ffcc9c7095ed59b4d56f5f8139a5205a1f"},
{couch_index,      "couch-index",      "6565cb961a8da21b21d213e4981133e119bb5ff1"},
{couch_mrview,     "couch-mrview",     "58a0de51233f55ee6cd92128cb19a3315984bff5"},
{couch_replicator, "couch-replicator", "73139f0ebaee1b7bb49f926aebb0c3106c21ce74"},
{couch_plugins,    "couch-plugins",    "3e73b723cb126cfc471b560d17c24a8b5c540085"},
{couch_event,      "couch-event",      "835a41885d1e276d207758954f8238aa7bba0ae8"},
{couch_stats,      "couch-stats",      "7895d4d3f509ed24f09b6d1a0bd0e06af34551dc"},
{couch_peruser,    "peruser",          "ff7d190970a46722137fbc7a1a75466e8a544ae1"},
{docs,             "documentation",    "57a65effe92685f54aa21e2512b5f6590ed08dc0", [raw]},
{ddoc_cache,       "ddoc-cache",       "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
{ets_lru,          "ets-lru",          "09128046ae9fbabfe1d70cb406aca878f6ea1dd5"},
{fabric,           "fabric",           "17f0377807804b7b55db6c6b378d9e266ea52236"},
{fauxton,          "fauxton",          "f0d4518617ac58fa394f7b3db92dd605d7253c98", [raw]},
{folsom,           "folsom",           "fbb7bc83806520ffef84107c85f53c1f7113c20d"},
{global_changes,   "global-changes",   "16d0200bcf1dc1700b07168f7a8174b486b9735d"},
{goldrush,         "goldrush",         {tag, "0.1.6"}},
{ibrowse,          "ibrowse",          "4af2d408607874d124414ac45df1edbe3961d1cd"},
{ioq,              "ioq",              "c7c75ebeaf41599e3a3e211097d864f0e7785829"},
{jiffy,            "jiffy",            "ea19c417f9fd52fa3f7ef2d378735e5532c59b29"},
{khash,            "khash",            "fc1a80fe38cb7f1c19ba0b4d275f14fbf3b5251e"},
{mango,            "mango",            "9eb60e78ca2d8abb42d40324470dd54d37a84746"},
{mem3,             "mem3",             "07c865611c5ff20dcbc17da126662471d0d6be57"},
{mochiweb,         "mochiweb",         "bd6ae7cbb371666a1f68115056f7b30d13765782"},
{oauth,            "oauth",            "099057a98e41f3aff91e77e3cf496d6c6fd901df"},
{rexi,             "rexi",             "a327b7dbeb2b0050f7ca9072047bf8ef2d282833"},
{snappy,           "snappy",           "0ab2796f82789895a2a86d403e63f3823d3c5a1d"},
{setup,            "setup",            "647ffbc4a1216239045af1e210863b9086f71cf4"},
{meck,             "meck",             {tag, "0.8.2"}}
],

BaseUrl = "https://git-wip-us.apache.org/repos/asf/",

MakeDep = fun
    ({AppName, {url, Url}, Version}) ->
        {AppName, ".*", {git, Url, Version}};
    ({AppName, {url, Url}, Version, Options}) ->
        {AppName, ".*", {git, Url, Version}, Options};
    ({AppName, RepoName, Version}) ->
        Url = BaseUrl ++ "couchdb-" ++ RepoName ++ ".git",
        {AppName, ".*", {git, Url, Version}};
    ({AppName, RepoName, Version, Options}) ->
        Url = BaseUrl ++ "couchdb-" ++ RepoName ++ ".git",
        {AppName, ".*", {git, Url, Version}, Options}
end,

AddConfig = [
    {require_otp_vsn, "R14B01|R14B03|R14B04|R16B03-1|17|18"},
    {deps_dir, "src"},
    {deps, lists:map(MakeDep, DepDescs)},
    {sub_dirs, ["rel"]},
    {lib_dirs, ["src/"]},
    {erl_opts, [debug_info]},
    {eunit_opts, [verbose]},
    {plugins, [eunit_plugin]},
    {post_hooks, [{compile, "escript support/build_js.escript"}]}
],

C = lists:foldl(fun({K, V}, CfgAcc) ->
    lists:keystore(K, 1, CfgAcc, {K, V})
end, CONFIG, AddConfig).