Implemented nuget push task

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 7f79be8c08
commit 1dae730554
  1. 33
      BuildServer/lib/tasks/dotnetnugetpush.js

@ -0,0 +1,33 @@
"use strict";
var sequential = require("./sequential");
var settings = require("../../settings");
module.exports = function (params, processor) {
var date = new Date(),
version = (params.major || "0") + "." + date.getFullYear() + "." + ((date.getMonth() + 1) * 100 + date.getDay()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds());
return sequential({
tasks: [
{
type: "dotnetbuilderwrapper",
params: {
command: "nugetpack",
BaseDirectory: processor.context.exported,
SpecPath: processor.context.exported + "/" + params.nuspec,
OutputDirectory: processor.context.release,
Version: version
}
},
{
type: "dotnetbuilderwrapper",
params: {
command: "nugetpush",
Package: processor.context.release + "/" + params.name + "." + version + ".nupkg",
NugetHost: settings.nugetHost,
ApiKey: settings.nugetApiKey
}
}
]
}, processor);
};
Loading…
Cancel
Save