Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update rebar to 3.18.0; use https:// when fetching deps from github #227

Open
wants to merge 7 commits into
base: develop-3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
_build/
rebar.lock
ebin/
deps/
tests/
/basho_bench
/rel/basho_bench
package
.rebar
*~
#*#
.DS_Store
60 changes: 7 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,19 @@ PKG_ID = basho-bench-$(PKG_VERSION)
PKG_BUILD = 1
BASE_DIR = $(shell pwd)
ERLANG_BIN = $(shell dirname $(shell which erl))
REBAR ?= $(BASE_DIR)/rebar
REBAR ?= $(BASE_DIR)/rebar3
OVERLAY_VARS ?=


all: deps compile
$(REBAR) skip_deps=true escriptize
all: compile
$(REBAR) escriptize

.PHONY: deps compile rel lock locked-all locked-deps
.PHONY: compile rel

rel: deps compile
cd rel && $(REBAR) generate skip_deps=true $(OVERLAY_VARS)
rel: compile
cd rel && $(REBAR) generate $(OVERLAY_VARS)

deps:
$(REBAR) get-deps

##
## Lock Targets
##
## see https://github.com/seth/rebar_lock_deps_plugin
lock: deps compile
$(REBAR) lock-deps

locked-all: locked-deps compile

locked-deps:
@echo "Using rebar.config.lock file to fetch dependencies"
$(REBAR) -C rebar.config.lock get-deps

compile: deps
# Temp hack to work around https://github.com/basho/riak-erlang-client/issues/151
(cd deps/riak_pb ; $(REBAR) clean compile deps_dir=..)
compile:
@($(REBAR) compile)

clean:
Expand Down Expand Up @@ -74,31 +56,3 @@ JOBS := $(addprefix job,${TARGETS})

all_results: ${JOBS} ; echo "$@ successfully generated."
${JOBS}: job%: ; Rscript --vanilla priv/summary.r -i tests/$*

##
## Packaging targets
##
.PHONY: package
export PKG_VERSION PKG_ID PKG_BUILD BASE_DIR ERLANG_BIN REBAR OVERLAY_VARS RELEASE

package.src: deps
mkdir -p package
rm -rf package/$(PKG_ID)
git archive --format=tar --prefix=$(PKG_ID)/ $(PKG_REVISION)| (cd package && tar -xf -)
${MAKE} -C package/$(PKG_ID) locked-deps
for dep in package/$(PKG_ID)/deps/*; do \
echo "Processing dep: $${dep}"; \
mkdir -p $${dep}/priv; \
git --git-dir=$${dep}/.git describe --always --tags >$${dep}/priv/vsn.git; \
done
find package/$(PKG_ID) -depth -name ".git" -exec rm -rf {} \;
tar -C package -czf package/$(PKG_ID).tar.gz $(PKG_ID)

dist: package.src
cp package/$(PKG_ID).tar.gz .

package: package.src
${MAKE} -C package -f $(PKG_ID)/deps/node_package/Makefile

pkgclean: distclean
rm -rf package
10 changes: 5 additions & 5 deletions include/basho_bench.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
-define(FAIL_MSG(Str, Args), ?ERROR(Str, Args), basho_bench_app:stop_or_kill()).
-define(STD_ERR(Str, Args), io:format(standard_error, Str, Args)).

-define(CONSOLE(Str, Args), lager:info(Str, Args)).
-define(CONSOLE(Str, Args), logger:info(Str, Args)).

-define(DEBUG(Str, Args), lager:debug(Str, Args)).
-define(INFO(Str, Args), lager:info(Str, Args)).
-define(WARN(Str, Args), lager:warning(Str, Args)).
-define(ERROR(Str, Args), lager:error(Str, Args)).
-define(DEBUG(Str, Args), logger:debug(Str, Args)).
-define(INFO(Str, Args), logger:info(Str, Args)).
-define(WARN(Str, Args), logger:warning(Str, Args)).
-define(ERROR(Str, Args), logger:error(Str, Args)).

-define(FMT(Str, Args), lists:flatten(io_lib:format(Str, Args))).

Expand Down
24 changes: 0 additions & 24 deletions pkg.vars.config

This file was deleted.

26 changes: 8 additions & 18 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
{require_otp_vsn, "20"}.
%% -*- mode: erlang -*-
{require_otp_vsn, "22"}.

{deps,
[
{folsom, "0.8.7"},
{lager, "2.*", {git, "git://github.com/erlang-lager/lager", {tag, "3.8.0"}}},
{ibrowse, ".*",
{git, "git://github.com/basho/ibrowse.git", {branch, "develop-3.0"}}},
{riakc, ".*",
{git, "git://github.com/basho/riak-erlang-client", {branch, "develop-3.0"}}},
{mochiweb, "2.9.*",
{git, "git://github.com/basho/mochiweb", {branch, "develop-3.0"}}},
{getopt, ".*",
{git, "git://github.com/jcomellas/getopt", {tag, "v0.8.2"}}},
{bitcask, ".*",
{git, "git://github.com/basho/bitcask", {branch, "develop-3.0"}}},
{eleveldb, ".*",
{git, "git://github.com/basho/eleveldb", {branch, "develop-3.0"}}}
{ibrowse, {git, "https://github.com/basho/ibrowse.git", {branch, "develop-3.0"}}},
{riakc, {git, "https://github.com/basho/riak-erlang-client", {branch, "develop"}}},
{mochiweb, {git, "https://github.com/basho/mochiweb", {branch, "develop-3.0"}}},
{getopt, {git, "https://github.com/jcomellas/getopt", {tag, "v0.8.2"}}},
{bitcask, {git, "https://github.com/basho/bitcask", {branch, "develop"}}},
{eleveldb, {git, "https://github.com/basho/eleveldb", {branch, "develop"}}}
]}.

{erl_opts, [{src_dirs, [src]},
{parse_transform, lager_transform}]}.

{escript_incl_apps, [
folsom,
getopt,
ibrowse,
lager,
mochiweb,
riakc,
bitcask,
Expand Down
50 changes: 0 additions & 50 deletions rebar.lock

This file was deleted.

Binary file modified rebar3
Binary file not shown.
63 changes: 0 additions & 63 deletions rel/reltool.config

This file was deleted.

11 changes: 5 additions & 6 deletions src/basho_bench.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
{registered, [ basho_bench_sup ]},
{applications, [kernel,
stdlib,
sasl,
lager]},
sasl]},
{mod, {basho_bench_app, []}},
{env, [
%% Run mode: How should basho_bench started as a separate node, or part of an
%% other node. The default is standalone, other option is included.
{app_run_mode, standalone},
%% Run mode: How should basho_bench started as a separate node, or part of an
%% other node. The default is standalone, other option is included.
{app_run_mode, standalone},

%%
%% Mode of load generation:
%% max - Generate as many requests as possible per worker
Expand Down
Loading