|
|
@ -26,20 +26,26 @@ module.exports = function (params, processor) { |
|
|
|
"built from " + processor.context.rev + "; " + |
|
|
|
"built from " + processor.context.rev + "; " + |
|
|
|
"repository: " + processor.context.owner + "/" + processor.context.reponame + "; " + |
|
|
|
"repository: " + processor.context.owner + "/" + processor.context.reponame + "; " + |
|
|
|
"branch: " + processor.context.branch, |
|
|
|
"branch: " + processor.context.branch, |
|
|
|
processAssemblyInfo = function (content, cb) { |
|
|
|
processAssemblyInfo = function (appendInformationalVersion) { |
|
|
|
if (!params.skipCodeSigning && !settings.skipCodeSigning) { |
|
|
|
return function (content, cb) { |
|
|
|
content = content.replace( |
|
|
|
if (!params.skipCodeSigning && !settings.skipCodeSigning) { |
|
|
|
/InternalsVisibleTo\s*\(\s*\"([\w.]+)\"\s*\)/g, |
|
|
|
content = content.replace( |
|
|
|
function (match, p1) { |
|
|
|
/InternalsVisibleTo\s*\(\s*\"([\w.]+)\"\s*\)/g, |
|
|
|
return "InternalsVisibleTo(\"" + p1 + ",PublicKey=" + settings.codeSigningPublicKey + "\")"; |
|
|
|
function (match, p1) { |
|
|
|
} |
|
|
|
return "InternalsVisibleTo(\"" + p1 + ",PublicKey=" + settings.codeSigningPublicKey + "\")"; |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
content = addAssemblyAttribute(content, "[assembly: System.Reflection.AssemblyInformationalVersion(\"" + version + "\")]"); |
|
|
|
} |
|
|
|
return cb(null, content); |
|
|
|
|
|
|
|
|
|
|
|
if (appendInformationalVersion) { |
|
|
|
|
|
|
|
content = addAssemblyAttribute(content, "[assembly: System.Reflection.AssemblyInformationalVersion(\"" + version + "\")]"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return cb(null, content); |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
glob("**/AssemblyInfo.cs", {cwd: processor.context.exported}, function (err, files) { |
|
|
|
glob("**/{InternalsVisible,AssemblyInfo}*.cs", {cwd: processor.context.exported}, function (err, files) { |
|
|
|
if (err) { |
|
|
|
if (err) { |
|
|
|
processor.onError(err); |
|
|
|
processor.onError(err); |
|
|
|
return processor.done(); |
|
|
|
return processor.done(); |
|
|
@ -56,7 +62,7 @@ module.exports = function (params, processor) { |
|
|
|
return function (callback) { |
|
|
|
return function (callback) { |
|
|
|
return async.waterfall([ |
|
|
|
return async.waterfall([ |
|
|
|
fs.readFile.bind(null, processor.context.exported + "/" + file, { encoding: "utf8" }), |
|
|
|
fs.readFile.bind(null, processor.context.exported + "/" + file, { encoding: "utf8" }), |
|
|
|
processAssemblyInfo, |
|
|
|
processAssemblyInfo(file.toLowerCase().indexOf("assemblyinfo.cs") >= 0), |
|
|
|
fs.writeFile.bind(null, processor.context.exported + "/" + file) |
|
|
|
fs.writeFile.bind(null, processor.context.exported + "/" + file) |
|
|
|
], function (err) { |
|
|
|
], function (err) { |
|
|
|
if (err) { |
|
|
|
if (err) { |
|
|
|