Improved NuGet packages versioning

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 9 years ago
parent 507ab50a53
commit f10a5132e9
  1. 1
      BuildServer/lib/tasks/dotnetbuild.js
  2. 2
      BuildServer/lib/tasks/dotnetnugetpack.js
  3. 6
      BuildServer/lib/tasks/dotnetnugetprocess.js
  4. 2
      BuildServer/lib/tasks/dotnetnugetpush.js

@ -22,6 +22,7 @@ module.exports = function (params, processor) {
params: { params: {
solution: params.solution, solution: params.solution,
skipCodeSigning: params.skipCodeSigning, skipCodeSigning: params.skipCodeSigning,
ignoreCodeAnalysis: params.ignoreCodeAnalysis,
target: "Build" target: "Build"
} }
} }

@ -4,7 +4,7 @@ var sequential = require('./sequential');
module.exports = function (params, processor) { module.exports = function (params, processor) {
var date = new Date(), var date = new Date(),
version = params.version || ((params.major || "0") + "." + date.getFullYear() + "." + ((date.getMonth() + 1) * 100 + date.getDate()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds())), version = (params.version || ((params.major || "0") + "." + (date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds()))) + "-r" + processor.context.rev.substr(0, 16),
nupkg = processor.context.exported + "/" + params.name + "." + version + ".nupkg"; nupkg = processor.context.exported + "/" + params.name + "." + version + ".nupkg";
return sequential({ return sequential({

@ -12,7 +12,8 @@ module.exports = function (params, processor) {
"params": { "params": {
"nuspec": params.nuspecName + ".nuspec", "nuspec": params.nuspecName + ".nuspec",
"name": params.nuspecName, "name": params.nuspecName,
"version": params.version "version": params.version,
"major": params.major
} }
}, },
"otherwise": { "otherwise": {
@ -20,7 +21,8 @@ module.exports = function (params, processor) {
"type": "dotnetnugetpack", "type": "dotnetnugetpack",
"params": { "params": {
"nuspec": params.nuspecName + ".nuspec", "nuspec": params.nuspecName + ".nuspec",
"version": params.version "version": params.version,
"major": params.major
} }
} }
}, processor); }, processor);

@ -5,7 +5,7 @@ var settings = require("../../settings");
module.exports = function (params, processor) { module.exports = function (params, processor) {
var date = new Date(), var date = new Date(),
version = params.version || ((params.major || "0") + "." + date.getFullYear() + "." + ((date.getMonth() + 1) * 100 + date.getDate()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds())), version = (params.version || ((params.major || "0") + "." + (date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate()) + "." + ((date.getHours() * 100 + date.getMinutes()) * 100 + date.getSeconds()))) + "-r" + processor.context.rev.substr(0, 16),
nupkg = processor.context.exported + "/" + params.name + "." + version + ".nupkg"; nupkg = processor.context.exported + "/" + params.name + "." + version + ".nupkg";
return sequential({ return sequential({

Loading…
Cancel
Save