fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From my...@apache.org
Subject [fineract-cn-demo-server] 13/26: Refactored code to remove boilerplate
Date Mon, 22 Jan 2018 15:49:07 GMT
This is an automated email from the ASF dual-hosted git repository.

myrle pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-demo-server.git

commit fcb6cfdb617fb9e3adc743625a65be2c4a20a019
Author: Ivange Larry <ivangelarry@gmail.com>
AuthorDate: Thu Sep 7 13:17:50 2017 +0100

    Refactored code to remove boilerplate
---
 scripts/Unix/initial-setup.sh | 291 ++++--------------------------------------
 1 file changed, 23 insertions(+), 268 deletions(-)

diff --git a/scripts/Unix/initial-setup.sh b/scripts/Unix/initial-setup.sh
index 2a66e0c..75ce49e 100755
--- a/scripts/Unix/initial-setup.sh
+++ b/scripts/Unix/initial-setup.sh
@@ -5,86 +5,20 @@ githubAccount=$1
 mkdir -p core
 cd core
 
-# REM initialize lang
-git clone 'https://github.com/'$githubAccount'/lang.git'
-cd lang
-git remote add upstream https://github.com/mifosio/lang.git
-git checkout develop
-# For some reason permission is denied 
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize async
-git clone 'https://github.com/'$githubAccount'/async.git'
-cd async
-git remote add upstream https://github.com/mifosio/async.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize cassandra
-git clone 'https://github.com/'$githubAccount'/cassandra.git'
-cd cassandra
-git remote add upstream https://github.com/mifosio/cassandra.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize mariadb
-git clone 'https://github.com/'$githubAccount'/mariadb.git'
-cd mariadb
-git remote add upstream https://github.com/mifosio/mariadb.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize data-jpa
-git clone 'https://github.com/'$githubAccount'/data-jpa.git'
-cd data-jpa
-git remote add upstream https://github.com/mifosio/data-jpa.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize command
-git clone 'https://github.com/'$githubAccount'/command.git'
-cd command
-git remote add upstream https://github.com/mifosio/command.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize api
-git clone 'https://github.com/'$githubAccount'/api.git'
-cd api
-git remote add upstream https://github.com/mifosio/api.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize test
-git clone 'https://github.com/'$githubAccount'/test.git'
-cd test
-git remote add upstream https://github.com/mifosio/test.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
+get_modules() {
+  for module in $@
+  do
+    git clone https://github.com/$githubAccount/$module.git
+    cd $module
+    git remote add upstream https://github.com/mifosio/$module.git
+    # For some reason permission is denied
+    chmod +x gradlew
+    ./gradlew publishToMavenLocal
+    cd ..
+  done
+}
+
+get_modules lang async cassandra mariadb data-jpa 'command' api 'test'
 
 # Return to start folder
 cd ..
@@ -94,223 +28,44 @@ mkdir tools
 cd tools
 
 # REM initialize javamoney
-git clone 'https://github.com/'$githubAccount'/javamoney-lib.git'
+git clone https://github.com/JavaMoney/javamoney-lib.git
 cd javamoney-lib
-git remote add upstream https://github.com/JavaMoney/javamoney-lib.git
-git checkout master
 mvn install -Dmaven.test.skip=true
 
 cd ..
 
 # REM initialize crypto
-git clone 'https://github.com/'$githubAccount'/crypto.git'
+git clone https://github.com/$githubAccount/crypto.git
 cd crypto
 git remote add upstream https://github.com/mifosio/crypto.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-cd ..
-
-# REM return to start folder
-cd ..
-
-# REM initialize anubis
-git clone 'https://github.com/'$githubAccount'/anubis.git'
-cd anubis
-git remote add upstream https://github.com/mifosio/anubis.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-cd ..
-
-# REM initialize permitted-feign-client
-git clone 'https://github.com/'$githubAccount'/permitted-feign-client.git'
-cd permitted-feign-client
-git remote add upstream https://github.com/mifosio/permitted-feign-client.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-cd ..
-
-# REM initialize provisioner
-git clone 'https://github.com/'$githubAccount'/provisioner.git'
-cd provisioner
-git remote add upstream https://github.com/mifosio/provisioner.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-cd ..
-
-# REM initialize identity
-git clone 'https://github.com/'$githubAccount'/identity.git'
-cd identity
-git remote add upstream https://github.com/mifosio/identity.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize rhythm
-git clone 'https://github.com/'$githubAccount'/rhythm.git'
-cd rhythm
-git remote add upstream https://github.com/mifosio/rhythm.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize template
-git clone 'https://github.com/'$githubAccount'/template.git'
-cd template
-git remote add upstream https://github.com/mifosio/template.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize office 
-git clone 'https://github.com/'$githubAccount'/office.git'
-cd office
-git remote add upstream https://github.com/mifosio/office.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize customer
-git clone 'https://github.com/'$githubAccount'/customer.git'
-cd customer
-git remote add upstream https://github.com/mifosio/customer.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize group
-git clone 'https://github.com/'$githubAccount'/group.git'
-cd group
-git remote add upstream https://github.com/mifosio/group.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize accounting
-git clone 'https://github.com/'$githubAccount'/accounting.git'
-cd accounting
-git remote add upstream https://github.com/mifosio/accounting.git
-git checkout develop
 chmod +x gradlew
 ./gradlew publishToMavenLocal
-
 cd ..
 
-# REM initialize portfolio
-git clone 'https://github.com/'$githubAccount'/portfolio.git'
-cd portfolio
-git remote add upstream https://github.com/mifosio/portfolio.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
+# exit tools directory
 cd ..
 
-# REM initialize deposit
-git clone 'https://github.com/'$githubAccount'/deposit-account-management.git'
-cd deposit-account-management
-git remote add upstream https://github.com/mifosio/deposit-account-management.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
 
-cd ..
-
-# REM initialize teller
-git clone 'https://github.com/'$githubAccount'/teller.git'
-cd teller
-git remote add upstream https://github.com/mifosio/teller.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize reporting
-git clone 'https://github.com/'$githubAccount'/reporting.git'
-cd reporting
-git remote add upstream https://github.com/mifosio/reporting.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
+get_modules anubis permitted-feign-client provisioner identity rhythm template office customer
group accounting portfolio deposit-account-management teller reporting
 
 mkdir integration-tests
 cd integration-tests
 
-# REM initialize service-starter
-git clone 'https://github.com/'$githubAccount'/service-starter.git'
-cd service-starter
-git remote add upstream https://github.com/mifosio/service-starter.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize default-setup
-git clone 'https://github.com/'$githubAccount'/default-setup.git'
-cd default-setup
-git remote add upstream https://github.com/mifosio/default-setup.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
+get_modules service-starter default-setup demo-server test-provisioner-identity-organization
 
-cd ..
-
-# REM initialize demo-server
-git clone 'https://github.com/'$githubAccount'/demo-server.git'
-cd demo-server
-git remote add upstream https://github.com/mifosio/demo-server.git
-git checkout develop
-chmod +x gradlew
-./gradlew publishToMavenLocal
-
-cd ..
-
-# REM initialize test-provisioner-identity-organization
-git clone 'https://github.com/'$githubAccount'/test-provisioner-identity-organization.git'
-cd test-provisioner-identity-organization
-git remote add upstream https://github.com/mifosio/test-provisioner-identity-organization.git
-git checkout develop
-chmod +x gradlew
-./gradlew build
-
-cd ..
-
-# REM initialize test-accounting-portfolio
-git clone 'https://github.com/'$githubAccount'/test-accounting-portfolio.git'
+# test-accounting-portfolio is built a little different so it's done separate from the others
+git clone https://github.com/$githubAccount/test-accounting-portfolio.git
 cd test-accounting-portfolio
 git remote add upstream https://github.com/mifosio/test-accounting-portfolio.git
-git checkout develop
 chmod +x gradlew
 ./gradlew build
-
-cd ..
-
+# exit integration-tests directory
 cd ..
 
 # REM initialize Web App
-git clone 'https://github.com/'$githubAccount'/fims-web-app.git'
+git clone https://github.com/$githubAccount/fims-web-app.git
 cd fims-web-app
 git remote add upstream https://github.com/mifosio/fims-web-app.git
-git checkout develop
 npm i
 
 cd ..

-- 
To stop receiving notification emails like this one, please contact
myrle@apache.org.

Mime
View raw message