Skip to content

Commit

Permalink
[ YC-000 ] improve sh scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
denyspavlov committed May 31, 2018
1 parent 44052ac commit ea30958
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 3 deletions.
2 changes: 1 addition & 1 deletion makedev.bat
Expand Up @@ -5,4 +5,4 @@
#
# @author Denys Pavlov

call mvn clean install -Pdev,derby,ftEmbededLucene,paymentBase -DskipTests=true
call mvn clean install -Pdev,derby,ftEmbededLucene,paymentAll,pricerules -DskipTests=true
2 changes: 1 addition & 1 deletion makedev.sh
Expand Up @@ -5,4 +5,4 @@
#
# @author Denys Pavlov

mvn clean install -Pdev,derby,ftEmbededLucene,paymentBase -DskipTests=true
mvn clean install -Pdev,derby,ftEmbededLucene,paymentAll,pricerules -DskipTests=true
58 changes: 57 additions & 1 deletion yc.sh
Expand Up @@ -10,7 +10,7 @@ RUNDIR=`pwd`

YC_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

MVN="$M2_HOME/bin/mvn"
MVN="mvn"

show_env() {
echo "================================================";
Expand Down Expand Up @@ -50,6 +50,11 @@ show_help() {
echo " derbygob - start derby server (in back mode) ";
echo " derbyend - stop derby server ";
echo " derbycon - connect to derby with ij ";
echo " derbycon - connect to derby with ij ";
echo " ";
echo " builddemo - build demo ";
echo " buildidea - build idea ";
echo " builddev - build dev ";
echo " ";
echo " aws - initialise aws image ";
echo "================================================";
Expand Down Expand Up @@ -220,6 +225,39 @@ start_nullsmtp() {

}

build_demo() {

echo "================================================";
echo " Build DEMO ";
echo "================================================";
echo " ";

"$MVN" clean install -PdevIntellijIDEA,derby,ftEmbededLucene,paymentAll,pricerules -DskipTests=true

}

build_dev() {

echo "================================================";
echo " Build DEV ";
echo "================================================";
echo " ";

"$MVN" clean install -Pdev,derby,ftEmbededLucene,paymentAll,pricerules -DskipTests=true

}

build_idea() {

echo "================================================";
echo " Build DEV ";
echo "================================================";
echo " ";

"$MVN" clean install -PdevIntellijIDEA,derby,ftEmbededLucene,paymentAll,pricerules -DskipTests=true

}

start_aws() {
echo "================================================";
echo " Starting YC AWS. Required: ";
Expand Down Expand Up @@ -431,6 +469,24 @@ then
start_nullsmtp;
cd "$RUNDIR"
exit 0;
elif [ $1 = "builddemo" ];
then
cd "$YC_HOME"
build_demo;
cd "$RUNDIR"
exit 0;
elif [ $1 = "buildidea" ];
then
cd "$YC_HOME"
build_idea;
cd "$RUNDIR"
exit 0;
elif [ $1 = "builddev" ];
then
cd "$YC_HOME"
build_dev;
cd "$RUNDIR"
exit 0;
elif [ $1 = "aws" ];
then
cd "$YC_HOME"
Expand Down

0 comments on commit ea30958

Please sign in to comment.