Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

config. refactoring for release generation

  • Loading branch information...
commit 6127d7faacc7e26b210a6263b8a10e48f2381a41 1 parent 6a23c41
@norton norton authored
Showing with 36 additions and 18 deletions.
  1. +1 −0  .gitignore
  2. +19 −15 Makefile
  3. +3 −1 rel/files/app.config
  4. +13 −2 rel/reltool.config
View
1  .gitignore
@@ -1,3 +1,4 @@
TAGS
lib/
+tmp/hibari/
rel/hibari/
View
34 Makefile
@@ -1,36 +1,40 @@
-VSN?=none
-DIST?=none
+VSN?=unknown
+DIST?=unknown
ARCH=$(shell erl -noshell -eval 'io:format(erlang:system_info(system_architecture)), halt().')
WORDSIZE=$(shell erl -noshell -eval 'io:format(integer_to_list(erlang:system_info(wordsize)*8)), halt().')
-PKG=hibari_$(VSN)-$(DIST)-$(ARCH)-$(WORDSIZE)
-TGZ=$(PKG).tgz
+RELPKG="hibari_$(VSN)-$(DIST)-$(ARCH)-$(WORDSIZE)"
+RELTGZ="$(RELPKG).tgz"
+RELSHA="hibari_$(VSN)-$(DIST)-$(ARCH)-$(WORDSIZE)-shasum.txt"
OTPREL=$(shell erl -noshell -eval 'io:format(erlang:system_info(otp_release)), halt().')
PLT=$(HOME)/.dialyzer_plt.$(OTPREL)
.PHONY: all test package generate compile eunit build-plt check-plt dialyze dialyze-spec ctags etags clean realclean distclean
-all: package
+all: compile
test: eunit
package: generate
- @echo "packaging: $(PKG) ..."
- @echo "*** UNDER CONSTRUCTION ***"
+ @echo "packaging: $(RELPKG) ..."
+ @rm -f ../$(RELTGZ) ../$(RELSHA)
+ @tar -C ./rel -cvzf ../$(RELTGZ) hibari
+ @(cd .. && shasum $(RELTGZ) | tee $(RELSHA))
+ @(cd .. && ls -l $(RELTGZ) $(RELSHA))
generate: clean compile
- @echo "generating: $(PKG) ..."
+ @echo "generating: $(RELPKG) ..."
find ./lib -name svn -type l | xargs rm -f
find ./lib -name rr-cache -type l | xargs rm -f
./rebar generate
compile:
- @echo "compiling: $(PKG) ..."
+ @echo "compiling: $(RELPKG) ..."
./rebar compile
eunit: compile
- @echo "eunit testing: $(PKG) ..."
+ @echo "eunit testing: $(RELPKG) ..."
./rebar eunit
build-plt: $(PLT)
@@ -39,11 +43,11 @@ check-plt: $(PLT)
dialyzer --plt $(PLT) --check_plt
dialyze: build-plt clean compile
- @echo "dialyzing: $(PKG) ..."
+ @echo "dialyzing: $(RELPKG) ..."
dialyzer --plt $(PLT) -r ./lib --no_spec
dialyze-spec: build-plt clean compile
- @echo "dialyzing w/spec: $(PKG) ..."
+ @echo "dialyzing w/spec: $(RELPKG) ..."
dialyzer --plt $(PLT) -r ./lib
ctags:
@@ -57,15 +61,15 @@ etags:
find ./lib -name "*.config" -print | grep -v .eunit | etags -a -
clean:
- @echo "cleaning: $(PKG) ..."
+ @echo "cleaning: $(RELPKG) ..."
./rebar clean
realclean: clean
- @echo "realcleaning: $(PKG) ..."
+ @echo "realcleaning: $(RELPKG) ..."
rm -f $(PLT)
distclean:
- @echo "distcleaning: $(PKG) ..."
+ @echo "distcleaning: $(RELPKG) ..."
repo forall -v -c 'git clean -fdx --exclude=lib/'
$(PLT):
View
4 rel/files/app.config
@@ -36,6 +36,8 @@
%%
{gdss_admin,
[{admin_server_distributed_nodes, [{{gdss_admin_nodes}}] },
- {application_data_dir, "."}
+ {application_data_dir, "."},
+ {brick_admin_conf_path, "root/conf/admin.conf"},
+ {brick_s3_conf_path, "root/conf/s3.conf"}
]}
].
View
15 rel/reltool.config
@@ -9,8 +9,8 @@
stdlib,
sasl,
xmerl,
- inets,
crypto,
+ inets,
gmt,
partition_detector,
congestion_watcher,
@@ -36,8 +36,8 @@
{excl_archive_filters, [".*"]},
{app, sasl, [{incl_cond, include}]},
{app, xmerl, [{incl_cond, include}]},
- {app, inets, [{incl_cond, include}]},
{app, crypto, [{incl_cond, include}]},
+ {app, inets, [{incl_cond, include}]},
{app, gmt, [{incl_cond, include}]},
{app, partition_detector, [{incl_cond, include}]},
{app, congestion_watcher, [{incl_cond, include}]},
@@ -70,6 +70,17 @@
{template, "files/app.config", "etc/app.config"},
{template, "files/vm.args", "etc/vm.args"},
+ %% root/{conf,htdocs/css,ssl}
+ {mkdir, "root"},
+ {copy, "../lib/gdss_admin/priv/root/conf/admin.conf", "root/conf/admin.conf"},
+ {copy, "../lib/gdss_admin/priv/root/conf/httpd.conf", "root/conf/httpd.conf"},
+ {copy, "../lib/gdss_admin/priv/root/conf/mime.types", "root/conf/mime.types"},
+ {copy, "../lib/gdss_admin/priv/root/conf/ssl.conf", "root/conf/ssl.conf"},
+ {copy, "../lib/gdss_admin/priv/root/htdocs/css/admin.css", "root/htdocs/css/admin.css"},
+ {copy, "../lib/gdss_admin/priv/root/ssl/ssl_client.pem", "root/ssl/ssl_client.pem"},
+ {copy, "../lib/gdss_admin/priv/root/ssl/ssl_server.pem", "root/ssl/ssl_server.pem"},
+ {copy, "../lib/gdss_s3_proto/priv/root/conf/s3.conf", "root/conf/s3.conf"},
+
%% data/
{mkdir, "{{gdss_data_dir}}"},
Please sign in to comment.
Something went wrong with that request. Please try again.