From 3bc9dbd22129ffbfb1067293749a3a0c888d1e76 Mon Sep 17 00:00:00 2001 From: Inga Lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Mon, 20 Jul 2015 09:07:32 +0300 Subject: [PATCH] Implemented nuget version specification --- BuildServer/lib/tasks/dotnetnugetpack.js | 2 +- BuildServer/lib/tasks/dotnetnugetpush.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BuildServer/lib/tasks/dotnetnugetpack.js b/BuildServer/lib/tasks/dotnetnugetpack.js index 6de0fcd..cca1b53 100644 --- a/BuildServer/lib/tasks/dotnetnugetpack.js +++ b/BuildServer/lib/tasks/dotnetnugetpack.js @@ -4,7 +4,7 @@ var sequential = require('./sequential'); 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.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({ diff --git a/BuildServer/lib/tasks/dotnetnugetpush.js b/BuildServer/lib/tasks/dotnetnugetpush.js index 5d8728a..8d67571 100644 --- a/BuildServer/lib/tasks/dotnetnugetpush.js +++ b/BuildServer/lib/tasks/dotnetnugetpush.js @@ -5,7 +5,7 @@ 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.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({