Nuget commands now are creating packages in code dir (instead of release)

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 10 years ago
parent 668730e1da
commit 80c1b3d57c
  1. 20
      BuildServer/lib/tasks/dotnetnugetpack.js
  2. 7
      BuildServer/lib/tasks/dotnetnugetpush.js

@ -1,14 +1,24 @@
"use strict";
var dotNetBuilderWrapper = require('./dotnetbuilderwrapper');
var sequential = require('./sequential');
module.exports = function (params, processor) {
var date = new Date();
return dotNetBuilderWrapper({
var date = new Date(),
version = (params.major || "0") + "." + date.getFullYear() + "." + ((date.getMonth() + 1) * 100 + date.getDate()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds()),
nupkg = processor.context.exported + "/" + params.name + "." + version + ".nupkg";
return sequential({
tasks: [
{
type: "dotnetbuilderwrapper",
params: {
command: "nugetpack",
BaseDirectory: processor.context.exported,
SpecPath: processor.context.exported + "/" + params.nuspec,
OutputDirectory: processor.context.release,
Version: (params.major || "0") + "." + date.getFullYear() + "." + ((date.getMonth() + 1) * 100 + date.getDate()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds())
OutputDirectory: processor.context.exported,
Version: version
}
}
]
}, processor);
};

@ -5,7 +5,8 @@ var settings = require("../../settings");
module.exports = function (params, processor) {
var date = new Date(),
version = (params.major || "0") + "." + date.getFullYear() + "." + ((date.getMonth() + 1) * 100 + date.getDate()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds());
version = (params.major || "0") + "." + date.getFullYear() + "." + ((date.getMonth() + 1) * 100 + date.getDate()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds()),
nupkg = processor.context.exported + "/" + params.name + "." + version + ".nupkg";
return sequential({
tasks: [
@ -15,7 +16,7 @@ module.exports = function (params, processor) {
command: "nugetpack",
BaseDirectory: processor.context.exported,
SpecPath: processor.context.exported + "/" + params.nuspec,
OutputDirectory: processor.context.release,
OutputDirectory: processor.context.exported,
Version: version
}
},
@ -23,7 +24,7 @@ module.exports = function (params, processor) {
type: "dotnetbuilderwrapper",
params: {
command: "nugetpush",
Package: processor.context.release + "/" + params.name + "." + version + ".nupkg",
Package: nupkg,
NugetHost: settings.nugetHost,
ApiKey: settings.nugetApiKey
}

Loading…
Cancel
Save