svn commit: r1850158 - in /ofbiz/tools/demo-backup/Nicolas: functions.sh old-manual.sh patch/ patch/old/ patch/stable/ patch/trunk/ stable-manual.sh trunk.sh

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1850158 - in /ofbiz/tools/demo-backup/Nicolas: functions.sh old-manual.sh patch/ patch/old/ patch/stable/ patch/trunk/ stable-manual.sh trunk.sh

nmalin
Author: nmalin
Date: Wed Jan  2 10:24:24 2019
New Revision: 1850158

URL: http://svn.apache.org/viewvc?rev=1850158&view=rev
Log:
Add patch management in script.
Create a directory patch with sub directory for each environment and after a svn reset, apply all patch present on sub directory related.

Added:
    ofbiz/tools/demo-backup/Nicolas/patch/
    ofbiz/tools/demo-backup/Nicolas/patch/old/
    ofbiz/tools/demo-backup/Nicolas/patch/stable/
    ofbiz/tools/demo-backup/Nicolas/patch/trunk/
Modified:
    ofbiz/tools/demo-backup/Nicolas/functions.sh
    ofbiz/tools/demo-backup/Nicolas/old-manual.sh
    ofbiz/tools/demo-backup/Nicolas/stable-manual.sh
    ofbiz/tools/demo-backup/Nicolas/trunk.sh

Modified: ofbiz/tools/demo-backup/Nicolas/functions.sh
URL: http://svn.apache.org/viewvc/ofbiz/tools/demo-backup/Nicolas/functions.sh?rev=1850158&r1=1850157&r2=1850158&view=diff
==============================================================================
--- ofbiz/tools/demo-backup/Nicolas/functions.sh (original)
+++ ofbiz/tools/demo-backup/Nicolas/functions.sh Wed Jan  2 10:24:24 2019
@@ -29,4 +29,12 @@ removeUneededFiles() {
     if [ -r "$OFBIZ_DIR/framework/base/config/jesse.properties" ]; then
         rm $OFBIZ_DIR/framework/base/config/jesse.properties
     fi
+}
+
+#apply patch dedicate to demo configuration
+applyPatches () {
+    cd $1
+    for i in $(ls $2); do
+        patch -p0 < $2/$i;
+    done
 }
\ No newline at end of file

Modified: ofbiz/tools/demo-backup/Nicolas/old-manual.sh
URL: http://svn.apache.org/viewvc/ofbiz/tools/demo-backup/Nicolas/old-manual.sh?rev=1850158&r1=1850157&r2=1850158&view=diff
==============================================================================
--- ofbiz/tools/demo-backup/Nicolas/old-manual.sh (original)
+++ ofbiz/tools/demo-backup/Nicolas/old-manual.sh Wed Jan  2 10:24:24 2019
@@ -17,11 +17,9 @@ removeUneededFiles $OFBIZ_DIR
 #check if contrast-rO0.jar is present and apply
 if [ ! -r "contrast-rO0.jar" ]; then
     wget -q https://svn.apache.org/repos/asf/ofbiz/branches/release15.12/tools/demo-backup/contrast-rO0.jar
+firanch13.7-demo.patch
 fi
-if [ ! -r "branch13.7-demo.patch" ]; then
-    wget https://svn.apache.org/repos/asf/ofbiz/tools/demo-backup/branch13.7-demo.patch
-    patch -p0 < branch13.7-demo.patch
-fi
+applyPatches $OFBIZ_DIR ~/patch/old
 
 #Load Data and run OFBiz
 ./ant load-demo

Modified: ofbiz/tools/demo-backup/Nicolas/stable-manual.sh
URL: http://svn.apache.org/viewvc/ofbiz/tools/demo-backup/Nicolas/stable-manual.sh?rev=1850158&r1=1850157&r2=1850158&view=diff
==============================================================================
--- ofbiz/tools/demo-backup/Nicolas/stable-manual.sh (original)
+++ ofbiz/tools/demo-backup/Nicolas/stable-manual.sh Wed Jan  2 10:24:24 2019
@@ -16,6 +16,8 @@ svn up
 
 removeUneededFiles $OFBIZ_DIR
 
+applyPatches $OFBIZ_DIR ~/patch/stable
+
 # run OFBiz
 ./gradlew --no-daemon "ofbiz --load-data"
 ./gradlew --no-daemon svnInfoFooter

Modified: ofbiz/tools/demo-backup/Nicolas/trunk.sh
URL: http://svn.apache.org/viewvc/ofbiz/tools/demo-backup/Nicolas/trunk.sh?rev=1850158&r1=1850157&r2=1850158&view=diff
==============================================================================
--- ofbiz/tools/demo-backup/Nicolas/trunk.sh (original)
+++ ofbiz/tools/demo-backup/Nicolas/trunk.sh Wed Jan  2 10:24:24 2019
@@ -16,6 +16,8 @@ svn up
 
 removeUneededFiles $OFBIZ_DIR
 
+applyPatches $OFBIZ_DIR ~/patch/trunk
+
 # run OFBiz
 ./gradlew --no-daemon loadAll
 ./gradlew --no-daemon svnInfoFooter