packform now writes version.txt

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 7 years ago
parent 00977dc988
commit ef5f588e26
  1. 11
      BuildServer/lib/builder.js
  2. 11
      BuildServer/lib/tasks/dotnetrewrite.js
  3. 7
      BuildServer/lib/tasks/packform.js

@ -43,6 +43,14 @@ const build = (options, callback) => {
const release = options.app.get('releasepath') + "/" + owner + "/" + reponame + "/" + branch + "/" + rev;
const statusQueue = async.queue((task, callback) => task(callback), 1);
const actualGitLoader = skipGitLoader ? (options, callback) => process.nextTick(callback) : gitLoader;
const date = new Date();
const versionInfo = date.getFullYear() + "." +
(date.getMonth() + 1) + "." +
date.getDate() + "." +
(date.getHours() * 100 + date.getMinutes()) + "; " +
"built from " + rev + "; " +
"repository: " + owner + "/" + reponame + "; " +
"branch: " + branch;
statusQueue.push((callback) => notifyStatus({
state: "pending",
@ -135,7 +143,8 @@ const build = (options, callback) => {
rev: rev,
tmp: tmp,
exported: exported,
release: release
release: release,
versionInfo: versionInfo
}, (err, result) => {
if (err) {
return done(err, result);

@ -15,15 +15,6 @@ module.exports = (params, processor) => ({
processor.context.dotnetrewriterDone = true;
const date = new Date();
const version = date.getFullYear() + "." +
(date.getMonth() + 1) + "." +
date.getDate() + "." +
(date.getHours() * 100 + date.getMinutes()) + "; " +
"built from " + processor.context.rev + "; " +
"repository: " + processor.context.owner + "/" + processor.context.reponame + "; " +
"branch: " + processor.context.branch;
const processAssemblyInfo = (appendInformationalVersion) => (content, cb) => {
if (!params.skipCodeSigning && !settings.skipCodeSigning) {
content = content.replace(
@ -33,7 +24,7 @@ module.exports = (params, processor) => ({
}
if (appendInformationalVersion) {
content = addAssemblyAttribute(content, "[assembly: System.Reflection.AssemblyInformationalVersion(\"" + version + "\")]");
content = addAssemblyAttribute(content, "[assembly: System.Reflection.AssemblyInformationalVersion(\"" + processor.context.versionInfo + "\")]");
}
return cb(null, content);

@ -10,6 +10,13 @@ module.exports = (params, processor) => sequential({
{
type: "cssnanoall"
},
{
type: "writefile",
params: {
filename: "version.txt",
data: processor.context.versionInfo
}
},
{
type: "zip",
params: {

Loading…
Cancel
Save