[ 
https://issues.apache.org/jira/browse/GEODE-3650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16317136#comment-16317136
 ] 

ASF GitHub Bot commented on GEODE-3650:
---------------------------------------

upthewaterspout closed pull request #25: GEODE-3650: Run restart script for 
persistence example
URL: https://github.com/apache/geode-examples/pull/25
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build.gradle b/build.gradle
index 1b2d368..e647b60 100644
--- a/build.gradle
+++ b/build.gradle
@@ -28,7 +28,7 @@ def verificationUrl = (geodeReleaseUrl != "") ? 
geodeReleaseUrl :
 
 def downloadFile = "apache-geode-${geodeVersion}.tar.gz"
 def installFile = "$buildDir/$downloadFile"
-def installDir = "$buildDir/apache-geode-${geodeVersion}"
+project.ext.installDir = "$buildDir/apache-geode-${geodeVersion}"
 
 task downloadGeode {
   inputs.property 'geodeVersion', geodeVersion
@@ -56,7 +56,7 @@ task verifyGeode(type: 
de.undercouch.gradle.tasks.download.Verify, dependsOn: do
 
 task installGeode(type: Copy, dependsOn: verifyGeode) {
   inputs.file installFile
-  outputs.dir installDir
+  outputs.dir project.installDir
 
   from tarTree(resources.gzip(installFile))
   into buildDir
@@ -119,18 +119,18 @@ subprojects {
   }
   clean.finalizedBy cleanServer
 
-  def geodePath = 
"${System.env.PATH}${System.getProperty('path.separator')}${installDir}/bin"
+  project.ext.geodePath = 
"${System.env.PATH}${System.getProperty('path.separator')}${project.installDir}/bin"
   task start(type: Exec, dependsOn: [installGeode, build, cleanServer]) {
     workingDir projectDir
-    environment 'GEODE_HOME', installDir
-    environment 'PATH', geodePath
+    environment 'GEODE_HOME', project.installDir
+    environment 'PATH', project.geodePath
     commandLine 'sh', '-c', "gfsh run --file=${projectDir}/scripts/start.gfsh"
   }
 
   task stop(type: Exec, dependsOn: installGeode) {
     workingDir projectDir
-    environment 'GEODE_HOME', installDir
-    environment 'PATH', geodePath
+    environment 'GEODE_HOME', project.installDir
+    environment 'PATH', project.geodePath
     commandLine 'sh', '-c', "gfsh run --file=${projectDir}/scripts/stop.gfsh"
   }
 
diff --git a/persistence/build.gradle b/persistence/build.gradle
new file mode 100644
index 0000000..cb45337
--- /dev/null
+++ b/persistence/build.gradle
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+task restart(type: Exec, dependsOn: [build, cleanServer]) {
+    workingDir projectDir
+    environment 'GEODE_HOME', rootProject.ext.installDir
+    environment 'PATH', project.geodePath
+    commandLine 'sh', '-c', "gfsh run 
--file=${projectDir}/scripts/restart.gfsh"
+}
+
+project.afterEvaluate {
+    runAll.dependsOn(restart);
+    restart.mustRunAfter(run);
+
+}
\ No newline at end of file


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Create new geode-example about persistence
> ------------------------------------------
>
>                 Key: GEODE-3650
>                 URL: https://issues.apache.org/jira/browse/GEODE-3650
>             Project: Geode
>          Issue Type: New Feature
>          Components: examples
>            Reporter: Michael Dodge
>            Assignee: Michael Dodge
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> Create an example that demonstrates persistence.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to