Skip to content

Commit

Permalink
add saiku script and modify buildall.sh, update ui submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
pstoellberger committed Oct 5, 2011
1 parent b10f8f7 commit 6260a1e
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 3 deletions.
3 changes: 1 addition & 2 deletions buildall.sh
Expand Up @@ -6,8 +6,7 @@ cd saiku-webapp
mvn clean install
cd ..
cd saiku-ui
# mvn clean package install:install-file -Dfile=target/saiku-ui-2.2-SNAPSHOT.war -DgroupId=org.saiku -DartifactId=saiku-ui -Dversion=2.2-SNAPSHOT -Dpackaging=war
mvn clean package install:install-file -Dfile=target/saiku-ui-2.2-SNAPSHOT.war -DgroupId=org.saiku -DartifactId=saiku-ui -Dversion=2.2-SNAPSHOT -Dpackaging=war
cd ../saiku-server
mvn clean package
cd ../saiku-bi-platform-plugin
mvn clean package
110 changes: 110 additions & 0 deletions saiku
@@ -0,0 +1,110 @@
#!/bin/bash

#
# Copyright (c) 2011 OSBI Ltd.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
# modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#


function usageBuild() {
cat <<eom
Usage: saiku build <all | project>
Builds all or an individual saiku project
Example:
saiku build all
Others:
saiku build < all | ui | server | webapp | bi-platform-plugin >
eom
}

function usageRun() {
cat <<eom
Usage: saiku run <package>
package can be:
server
Executes dist/saiku-server/start-saiku.sh
ui [port] [backend_host] [backend_port]
Executes node saiku-ui/server.js [port] [backend_host] [backend_port]
Default is:
node server.js 8080 dev.analytical-labs.com 80
eom
}

case $1 in
"build")
if [[ -z $2 ]]; then
usageBuild
exit 1
fi
case $2 in
"all")
sh buildall.sh
;;
"ui")
cd saiku-ui
mvn clean package install:install-file -Dfile=target/saiku-ui-2.2-SNAPSHOT.war -DgroupId=org.saiku -DartifactId=saiku-ui -Dversion=2.2-SNAPSHOT -Dpackaging=war
;;
*)
cd saiku-$2
mvn clean package
;;
esac
;;
"run")
if [[ -z $2 ]]; then
usageRun
exit 1
fi
case $2 in
"server")
echo ""
echo "Running Server....."
cd saiku-server/target/dist/saiku-server/
sh start-saiku.sh
;;
"ui")
cd saiku-ui
if [ ! -d ./node_modules ]; then
echo "module 'express' not found in saiku-ui/node_modules"
echo "installing express ...."
npm install express
fi
echo "Running UI.... "
node server.js $3 $4 $5
;;
*)
echo "-----------------------------------------------------"
echo " E R R O R : Invalid option: $2"
echo "-----------------------------------------------------"
echo ""
usageRun
exit 1
;;
esac

;;
*)
echo "-----------------------------------------------------"
echo " E R R O R : Invalid option: $1" >&2
echo "-----------------------------------------------------"
echo ""
usageBuild
usageRun
exit 1
;;

esac

2 changes: 1 addition & 1 deletion saiku-ui
Submodule saiku-ui updated 1 files
+1 −1 server.js

0 comments on commit 6260a1e

Please sign in to comment.