Build server prototype (integration with GitHub / NuGet / etc)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
micro-build-server/BuildServer/lib/routes/artifact.ts

22 lines
623 B

"use strict";
import * as express from "express";
import { getSettings } from "../settings-wrapper";
export default ((req, res) => {
const options = {
branch: `/refs/heads/${req.params.branch}`,
branchName: req.params.branch,
file: req.params[0],
owner: req.params.owner,
reponame: req.params.reponame,
rev: req.params.rev,
};
const settings = getSettings(req.app);
const pathParts = [settings.releasepath, options.owner, options.reponame, options.branch, options.rev, options.file];
res.sendfile(pathParts.join("/"));
}) as express.RequestHandler;