From fda4de3e7bc2b19aff94d94aea1b1fb8e304ef0d Mon Sep 17 00:00:00 2001 From: Manuri Date: Sun, 1 Jul 2018 00:44:20 +0530 Subject: [PATCH] Make version in scripts auto update --- component/pom.xml | 6 ++++++ component/src/main/assembly/dist.xml | 2 +- .../src/main/resources/installation-scripts/install.bat | 2 +- .../src/main/resources/installation-scripts/install.sh | 2 +- .../src/main/resources/installation-scripts/uninstall.bat | 2 +- .../src/main/resources/installation-scripts/uninstall.sh | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/component/pom.xml b/component/pom.xml index 1e64060..2c7245a 100644 --- a/component/pom.xml +++ b/component/pom.xml @@ -89,6 +89,12 @@ + + + src/main/resources + true + + diff --git a/component/src/main/assembly/dist.xml b/component/src/main/assembly/dist.xml index 4400280..f4305de 100644 --- a/component/src/main/assembly/dist.xml +++ b/component/src/main/assembly/dist.xml @@ -36,7 +36,7 @@ ./balo - ${project.basedir}/src/main/resources/installation-scripts + ${project.build.directory}/classes/installation-scripts . diff --git a/component/src/main/resources/installation-scripts/install.bat b/component/src/main/resources/installation-scripts/install.bat index 7925a90..daaccca 100644 --- a/component/src/main/resources/installation-scripts/install.bat +++ b/component/src/main/resources/installation-scripts/install.bat @@ -27,7 +27,7 @@ IF NOT EXIST "%ballerina_home%/bin/ballerina.bat" ( SET ballerina_lib_location=%ballerina_home%\bre\lib SET ballerina_balo_location=%ballerina_home%\lib\repo -SET version=0.5.7-SNAPSHOT +SET version=${project.version} SET package_name=cassandra IF EXIST "%ballerina_lib_location%\wso2-%package_name%-package-%version%.jar" ( diff --git a/component/src/main/resources/installation-scripts/install.sh b/component/src/main/resources/installation-scripts/install.sh index f299a4d..f025f8d 100644 --- a/component/src/main/resources/installation-scripts/install.sh +++ b/component/src/main/resources/installation-scripts/install.sh @@ -24,7 +24,7 @@ fi ballerina_lib_location=$ballerina_home/bre/lib/ ballerina_balo_location=$ballerina_home/lib/repo/ -version=0.5.7-SNAPSHOT +version=${project.version} package_name=cassandra if [ -e "$ballerina_lib_location/wso2-$package_name-package-$version.jar" ] diff --git a/component/src/main/resources/installation-scripts/uninstall.bat b/component/src/main/resources/installation-scripts/uninstall.bat index d540471..894d808 100644 --- a/component/src/main/resources/installation-scripts/uninstall.bat +++ b/component/src/main/resources/installation-scripts/uninstall.bat @@ -22,7 +22,7 @@ SET /P ballerina_home=Please enter Ballerina home: SET ballerina_lib_location=%ballerina_home%\bre\lib\ SET ballerina_balo_location=%ballerina_home%\lib\repo\ -SET version=0.5.7-SNAPSHOT +SET version=${project.version} SET package_name=cassandra IF NOT EXIST "%ballerina_lib_location%\wso2-%package_name%-package-%version%.jar" ( diff --git a/component/src/main/resources/installation-scripts/uninstall.sh b/component/src/main/resources/installation-scripts/uninstall.sh index a5fc242..f0704e2 100644 --- a/component/src/main/resources/installation-scripts/uninstall.sh +++ b/component/src/main/resources/installation-scripts/uninstall.sh @@ -24,7 +24,7 @@ fi ballerina_lib_location=$ballerina_home/bre/lib/ ballerina_balo_location=$ballerina_home/lib/repo/ -version=0.5.7-SNAPSHOT +version=${project.version} package_name=cassandra if [ ! -e "$ballerina_lib_location/wso2-$package_name-package-$version.jar" ]