Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
4314388d11 | |||
49e2010f07 | |||
c9bf7c4091 |
@ -3,13 +3,19 @@ var router = express.Router();
|
|||||||
var exec = require('child_process').exec;
|
var exec = require('child_process').exec;
|
||||||
/* GET home page. */
|
/* GET home page. */
|
||||||
router.all('/', function(req, res, next) {
|
router.all('/', function(req, res, next) {
|
||||||
|
console.log("some one is here");
|
||||||
if(req.headers['x-github-event'] === 'push'){
|
if(req.headers['x-github-event'] === 'push'){
|
||||||
if(req.body.ref === "refs/heads/master"){
|
console.log("got a push!");
|
||||||
console.log('time to update master!');
|
if(req.body.ref === "refs/heads/prod"){
|
||||||
|
console.log('time to update prod!');
|
||||||
exec('/var/www/gitwrapperdeploy.sh', console.log, console.log);
|
exec('/var/www/gitwrapperdeploy.sh', console.log, console.log);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res.render('index', { title: 'Express' });
|
res.render('index', { title: 'Express' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
router.get('/dbdump', function(req, res, nex){
|
||||||
|
res.sendFile('/var/backups/db/djangodump.json');
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1><%= title %></h1>
|
<h1><%= title %></h1>
|
||||||
<p>Welcome to <%= title %></p>
|
<p>YO!! <%= title %></p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user