summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java
index c8c39d0..825ce8f 100644
--- a/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java
+++ b/src/main/java/uk/co/blatech/blaears/controllers/GitPushController.java
@@ -1,6 +1,7 @@
package uk.co.blatech.blaears.controllers;
import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
@@ -18,6 +19,8 @@ import java.io.IOException;
@Controller
public class GitPushController {
+ private static final Logger log = Logger.getLogger(GitPushController.class);
+
@RequestMapping(value = "/git/push", method = RequestMethod.POST)
String push(@RequestBody Push pushMsg, Model model){
try {
@@ -28,8 +31,8 @@ public class GitPushController {
}
commitMsg += commit.getMessage();
}
+ log.info(commitMsg);
Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom beep | bash /home/smsd/msgrelay.bash "});
- Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + commitMsg + " | bash /home/smsd/msgrelay.bash "});
//DANGER
Runtime.getRuntime().exec(new String[]{"/bin/bash", "-c", "echo theblueroom " + pushMsg.getUserName() + " pushed to " + pushMsg.getRepository().getName() + ": "+ commitMsg + " | bash /home/smsd/msgrelay.bash "});