You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/11/23 14:30:12 UTC
[sling-site] branch master updated: Remove duplicated method
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/master by this push:
new 7db2b96 Remove duplicated method
7db2b96 is described below
commit 7db2b96c02beb3d44feb0061708b40f0094d1ae6
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Nov 23 15:28:59 2017 +0100
Remove duplicated method
---
src/main/jbake/templates/includes/Git.groovy | 2 +-
src/main/jbake/templates/includes/U.groovy | 10 ----------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/main/jbake/templates/includes/Git.groovy b/src/main/jbake/templates/includes/Git.groovy
index 5a055f5..9a703fb 100644
--- a/src/main/jbake/templates/includes/Git.groovy
+++ b/src/main/jbake/templates/includes/Git.groovy
@@ -7,7 +7,7 @@ class Git {
def static getRevisionInfo(filename) {
def gitCmd = 'git log -1 --format=%h####%ad####%an####%s ' + filename
def defaultText = "0####0000####<MISSING>####<MISSING>"
- def gitInfo = includes.U.exec(gitCmd, defaultText).split("####")
+ def gitInfo = includes.OS.exec(gitCmd, defaultText).split("####")
return [
lastCommit : gitInfo[0],
date : gitInfo[1],
diff --git a/src/main/jbake/templates/includes/U.groovy b/src/main/jbake/templates/includes/U.groovy
index cb1595b..8916316 100644
--- a/src/main/jbake/templates/includes/U.groovy
+++ b/src/main/jbake/templates/includes/U.groovy
@@ -56,14 +56,4 @@ class U {
}
return result
}
-
- def static exec(cmd, defaultText) {
- try {
- def p = cmd.execute()
- p.waitFor()
- return p.text
- } catch(Exception e) {
- return defaultText
- }
- }
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].