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/tasks/dotnetnugetprocess.ts

40 lines
1.2 KiB

"use strict";
import { GenericTask } from "../types";
import conditional from "./conditional";
import dotnetnugetpack from "./dotnetnugetpack";
import dotnetnugetpush from "./dotnetnugetpush";
interface IDotNetNuGetPushParameters {
readonly major: string;
readonly nuspecName: string;
readonly version: string;
readonly withoutCommitSha: boolean;
readonly masterRepoOwner: string;
}
export default ((params) => (processor) => conditional({
8 years ago
branch: "master",
otherwise: {
name: "nuget-pack",
task: dotnetnugetpack({
8 years ago
major: params.major,
name: params.nuspecName,
nuspec: `${params.nuspecName}.nuspec`,
version: params.version,
withoutCommitSha: params.withoutCommitSha,
}),
},
8 years ago
owner: params.masterRepoOwner,
task: {
name: "nuget-push",
task: dotnetnugetpush({
8 years ago
major: params.major,
name: params.nuspecName,
nuspec: `${params.nuspecName}.nuspec`,
version: params.version,
withoutCommitSha: params.withoutCommitSha,
}),
8 years ago
},
})(processor)) as GenericTask<IDotNetNuGetPushParameters>;