groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy-website] branch asf-site updated: prepare for auto updating of dev site
Date Wed, 06 Nov 2019 02:38:43 GMT
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new b0eb007  prepare for auto updating of dev site
b0eb007 is described below

commit b0eb00709e9eb8bc42d53b69bd8b5679e9a4d821
Author: Paul King <paulk@asert.com.au>
AuthorDate: Wed Nov 6 12:38:33 2019 +1000

    prepare for auto updating of dev site
---
 site-dev/build.gradle | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/site-dev/build.gradle b/site-dev/build.gradle
index 23a5d06..6ad5f8a 100644
--- a/site-dev/build.gradle
+++ b/site-dev/build.gradle
@@ -45,19 +45,6 @@ def gitboxUrl = project.findProperty('gitPublishRemote') ?: 'https://gitbox.apac
 def stagingDevSite = "$project.buildDir/staging-dev-site/"
 def generatedDevSite = "$project.buildDir/site/"
 
-def shell = { cmd ->
-    println cmd
-    exec {
-        if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
-            executable 'cmd.exe'
-            args '/c', cmd
-        } else {
-            executable 'sh'
-            args '-c', cmd
-        }
-    }
-}
-
 task copyAssets(type:Copy) {
     from file('../site/src/site/assets')
     into file("$buildDir/site")
@@ -218,6 +205,16 @@ task publishWebsite(dependsOn: commitWebsite) {
         }
 
         // Because git.push() fails to authenticate, run git push directly.
-        shell "git push asf-site asf-site"
+        def cmd = 'git push origin asf-site'
+        exec {
+            workingDir stagingDevSite
+            if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows'))
{
+                executable 'cmd.exe'
+                args '/c', cmd
+            } else {
+                executable 'sh'
+                args '-c', cmd
+            }
+        }
     }
 }


Mime
View raw message