瀏覽代碼

Merge pull request #1179 from TechEmpower/1178

Fixed the rebar issue
Mike Smith 10 年之前
父節點
當前提交
6ad4a0f5d4

+ 1 - 1
frameworks/Erlang/cowboy/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-fw_depends erlang
+fw_depends erlang rebar

二進制
frameworks/Erlang/cowboy/rebar


+ 2 - 2
frameworks/Erlang/cowboy/setup_erlang.py

@@ -7,8 +7,8 @@ def start(args, logfile, errfile):
 
   try:
     subprocess.check_call("rm -rf deps/*", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
-    subprocess.check_call("./rebar get-deps", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
-    subprocess.check_call("./rebar compile", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
+    subprocess.check_call("$IROOT/rebar/rebar get-deps", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
+    subprocess.check_call("$IROOT/rebar/rebar compile", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
     subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s hello_world -noshell -detached", shell=True, cwd="cowboy", stderr=errfile, stdout=logfile)
     return 0
   except subprocess.CalledProcessError:

+ 1 - 1
frameworks/Erlang/elli/install.sh

@@ -1,3 +1,3 @@
 #!/bin/bash
 
-fw_depends erlang
+fw_depends erlang rebar

二進制
frameworks/Erlang/elli/rebar


+ 1 - 1
frameworks/Erlang/elli/rebar.config

@@ -1,6 +1,6 @@
 {deps,
  [
-  {jiffy, ".*", {git, "https://github.com/davisp/jiffy.git", {tag, "0.8.3"}}},
+  {jiffy, ".*", {git, "https://github.com/davisp/jiffy.git", {tag, "0.8.5"}}},
   {emysql, ".*", {git, "https://github.com/Eonblast/Emysql.git"}},
   {elli, "", {git, "git://github.com/knutin/elli.git"}}
  ]}.

+ 3 - 2
frameworks/Erlang/elli/setup_erlang.py

@@ -6,8 +6,9 @@ def start(args, logfile, errfile):
   setup_util.replace_text("elli/src/elli_bench_sup.erl", "\"benchmarkdbpass\", \".*\", 3306", "\"benchmarkdbpass\", \"" + args.database_host + "\", 3306")
   
   try:
-    subprocess.check_call("./rebar get-deps", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
-    subprocess.check_call("./rebar compile", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
+    subprocess.check_call("rm -rf deps/*", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
+    subprocess.check_call("$IROOT/rebar/rebar get-deps", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
+    subprocess.check_call("$IROOT/rebar/rebar compile", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
     # adding +K true seemed to actually slow performance
     subprocess.check_call("erl -pa ebin deps/*/ebin +sbwt very_long +swt very_low -s elli_bench -noshell -detached", shell=True, cwd="elli", stderr=errfile, stdout=logfile)
     return 0

+ 12 - 0
toolset/setup/linux/systools/rebar.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+
+RETCODE=$(fw_exists $IROOT/rebar.installed)
+[ ! "$RETCODE" == 0 ] || { return 0; }
+
+fw_get https://github.com/rebar/rebar/archive/2.5.1.tar.gz -O rebar-2.5.1.tar.gz
+fw_untar rebar-2.5.1.tar.gz
+mv rebar-2.5.1 rebar
+cd rebar
+./bootstrap
+
+touch $IROOT/rebar.installed