Fixed artifact subfolders support

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 1973166fed
commit a9df031a36
  1. 2
      BuildServer/app.js
  2. 2
      BuildServer/routes/artifact.js

@ -42,7 +42,7 @@ app.get('/manual', routes.manual.get);
app.post('/manual', routes.manual.post); app.post('/manual', routes.manual.post);
app.get('/status/:owner/:reponame/:branch/:rev?', routes.status.page); app.get('/status/:owner/:reponame/:branch/:rev?', routes.status.page);
app.get('/status.svg', routes.status.image); app.get('/status.svg', routes.status.image);
app.get('/artifact/:owner/:reponame/:branch/:rev/:file', routes.artifact); app.get('/artifact/:owner/:reponame/:branch/:rev/*', routes.artifact);
http.createServer(app).listen(app.get('port'), function(){ http.createServer(app).listen(app.get('port'), function(){
console.log('Express server listening on port ' + app.get('port')); console.log('Express server listening on port ' + app.get('port'));

@ -7,7 +7,7 @@ module.exports = function(req, res) {
branchName: req.params.branch, branchName: req.params.branch,
branch: "/refs/heads/" + req.params.branch, branch: "/refs/heads/" + req.params.branch,
rev: req.params.rev, rev: req.params.rev,
file: req.params.file file: req.params[0]
}; };
res.sendfile(req.app.get('releasepath') + "/" + options.owner + "/" + options.reponame + "/" + options.branch + "/" + options.rev + "/" + options.file); res.sendfile(req.app.get('releasepath') + "/" + options.owner + "/" + options.reponame + "/" + options.branch + "/" + options.rev + "/" + options.file);

Loading…
Cancel
Save