TECHNOLOGY-22

Technology /  TECHNOLOGY-22
Добавление в сервисы информации об их версии
dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 10 years ago
parent 367bd9cb69
commit f5e405e897
  1. 8
      BuildServer/lib/tasks/dotnetpackwebapp.js
  2. 2
      BuildServer/lib/tasks/dotnetpackwebapp.template.msbuild
  3. 9
      BuildServer/lib/tasks/dotnetpackwebapp.template.version.aspx

@ -7,6 +7,7 @@ var sequential = require('./sequential');
var msbuildTemplate = fs.readFileSync(__dirname + "/dotnetpackwebapp.template.msbuild", {encoding: "utf8"}); var msbuildTemplate = fs.readFileSync(__dirname + "/dotnetpackwebapp.template.msbuild", {encoding: "utf8"});
var deployTemplate = fs.readFileSync(__dirname + "/dotnetpackwebapp.template.bat", {encoding: "utf8"}); var deployTemplate = fs.readFileSync(__dirname + "/dotnetpackwebapp.template.bat", {encoding: "utf8"});
var versionTemplate = fs.readFileSync(__dirname + "/dotnetpackwebapp.template.version.aspx", {encoding: "utf8"});
module.exports = function (params, processor) { module.exports = function (params, processor) {
@ -26,6 +27,13 @@ module.exports = function (params, processor) {
data: Mustache.render(deployTemplate, params) data: Mustache.render(deployTemplate, params)
} }
}, },
{
type: "writefile",
params: {
filename: "version.aspx",
data: Mustache.render(versionTemplate, params)
}
},
{ {
type: "dotnetbuilderwrapper", type: "dotnetbuilderwrapper",
params: { params: {

@ -26,6 +26,8 @@
Destination="$(PublishDirectory)\NLog.config" Destination="$(PublishDirectory)\NLog.config"
Transform="$(WebSources)\NLog.$(Configuration).config" /> Transform="$(WebSources)\NLog.$(Configuration).config" />
<Copy SourceFiles="$(HomeDirectory)\version.aspx" DestinationFolder="$(PublishDirectory)" />
<CallTarget Targets="RemoveUnwantedFiles" /> <CallTarget Targets="RemoveUnwantedFiles" />
<MakeDir Directories="$(PackagesDirectory)" /> <MakeDir Directories="$(PackagesDirectory)" />

@ -0,0 +1,9 @@
<%@ Page Language="C#" %>
{{#versionTypeName}}
<% var assembly = typeof({{versionTypeName}}).Assembly; %>
<% var attribute = (System.Reflection.AssemblyInformationalVersionAttribute)assembly.GetCustomAttributes(typeof(System.Reflection.AssemblyInformationalVersionAttribute), false).Single(); %>
<%= attribute.InformationalVersion %>
{{/versionTypeName}}
{{^versionTypeName}}
Version information unavailable
{{/versionTypeName}}
Loading…
Cancel
Save