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: {
solution: params.solution,
skipCodeSigning: params.skipCodeSigning,
ignoreCodeAnalysis: params.ignoreCodeAnalysis,
target: "Build"
}
}

@ -4,7 +4,7 @@ var sequential = require('./sequential');
module.exports = function (params, processor) {
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";
return sequential({

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

@ -5,7 +5,7 @@ var settings = require("../../settings");
module.exports = function (params, processor) {
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";
return sequential({

Loading…
Cancel
Save