Skip to content

Commit 1379e1a

Browse files
James Martinkuenishi
authored andcommitted
Updated to use node_package.
1 parent 3e330c5 commit 1379e1a

2 files changed

Lines changed: 42 additions & 2 deletions

File tree

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
REPO ?= basho_bench
2+
3+
PKG_REVISION ?= $(shell git describe --tags)
4+
PKG_VERSION ?= $(shell git describe --tags | tr - .)
5+
PKG_ID = bashobench-$(PKG_VERSION)
6+
PKG_BUILD = 1
7+
BASE_DIR = $(shell pwd)
8+
ERLANG_BIN = $(shell dirname $(shell which erl))
9+
REBAR ?= $(BASE_DIR)/rebar
10+
OVERLAY_VARS ?=
11+
12+
113
.PHONY: deps
214

315
all: deps compile
@@ -33,3 +45,31 @@ JOBS := $(addprefix job,${TARGETS})
3345

3446
all_results: ${JOBS} ; echo "$@ successfully generated."
3547
${JOBS}: job%: ; Rscript --vanilla priv/summary.r -i tests/$*
48+
49+
##
50+
## Packaging targets
51+
##
52+
.PHONY: package
53+
export PKG_VERSION PKG_ID PKG_BUILD BASE_DIR ERLANG_BIN REBAR OVERLAY_VARS RELEASE
54+
55+
package.src: deps
56+
mkdir -p package
57+
rm -rf package/$(PKG_ID)
58+
git archive --format=tar --prefix=$(PKG_ID)/ $(PKG_REVISION)| (cd package && tar -xf -)
59+
${MAKE} -C package/$(PKG_ID) deps
60+
for dep in package/$(PKG_ID)/deps/*; do \
61+
echo "Processing dep: $${dep}"; \
62+
mkdir -p $${dep}/priv; \
63+
git --git-dir=$${dep}/.git describe --tags >$${dep}/priv/vsn.git; \
64+
done
65+
find package/$(PKG_ID) -depth -name ".git" -exec rm -rf {} \;
66+
tar -C package -czf package/$(PKG_ID).tar.gz $(PKG_ID)
67+
68+
dist: package.src
69+
cp package/$(PKG_ID).tar.gz .
70+
71+
package: package.src
72+
${MAKE} -C package -f $(PKG_ID)/deps/node_package/Makefile
73+
74+
pkgclean: distclean
75+
rm -rf package

rebar.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
%% increments. If someone wants to take advantage of a
99
%% new folsom feature, that desire + float incr must be
1010
%% weighed.
11+
{node_package, "1.2.2", {git, "git://github.com/basho/node_package", {tag, "1.2.2"}}},
1112
{folsom, ".*", {git, "git://github.com/basho/folsom.git", {branch, "boundary-0.7.1+basho-bench-float"}}},
12-
1313
{lager, "2.*", {git, "git://github.com/basho/lager", {tag, "2.0.3"}}},
1414
{ibrowse, ".*",
1515
{git, "git://github.com/cmullaparthi/ibrowse.git", {tag, "v3.0.4"}}},
@@ -33,7 +33,7 @@
3333
{erl_opts, [{src_dirs, [src]},
3434
{parse_transform, lager_transform}]}.
3535

36-
{escript_incl_apps, [lager, getopt, bear, folsom, ibrowse, riakc, riak_pb, mochiweb, protobuffs, velvet, goldrush]}.
36+
{escript_incl_apps, [node_package, lager, getopt, bear, folsom, ibrowse, riakc, mochiweb, protobuffs, velvet, goldrush]}.
3737

3838
{escript_emu_args, "%%! +K true -rsh ssh\n"}.
3939
%% Use this for the Java client bench driver

0 commit comments

Comments
 (0)