forked from skinny-framework/skinny-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
skinny
executable file
·55 lines (50 loc) · 1.34 KB
/
skinny
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
#!/bin/sh
sbt_path=`which sbt`
if [ "`which sbt`" == "" ]; then
brew install sbt
fi
function run_app() {
sbt "project example" "~;container:restart"
}
command="$1"
if [ "$command" == "run" ];then
run_app
elif [ "$command" == "clean" ];then
sbt clean
elif [ "$command" == "update" ];then
sbt update
elif [ "$command" == "console" ];then
sbt example/console
elif [ "$command" == "compile" ];then
sbt compile
elif [ "$command" == "example-test" ];then
export SKINNY_ENV=test
sbt example/test
elif [ "$command" == "~test" ];then
export SKINNY_ENV=test
sbt "~;test"
elif [ "$command" == "test" ];then
export SKINNY_ENV=test
sbt test
elif [ "$command" == "test:coverage" ];then
export SKINNY_ENV=test
sbt scoverage:test
elif [ "$command" == "db:migrate" ];then
sbt "example/run db:migrate $2"
elif [ "$command" == "db:repair" ];then
sbt "example/run db:repair $2"
elif [ "$command" == "package" ];then
sbt package
else
echo ""
echo "Usage: skinny [COMMAND] [OPTIONS]..."
echo ""
echo " run : will run example app"
echo " clean : will clear target directory"
echo " update : will update dependencies"
echo " console : will run sbt console"
echo " compile : will compile all the classes"
echo " test : will run all the tests"
echo " package : will create *.war file to deploy"
echo ""
fi