|
|
|
@ -102,11 +102,14 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
|
|
|
|
}
|
|
|
|
|
const xmlSource = [
|
|
|
|
|
{
|
|
|
|
|
'?xml version="1.0"': [
|
|
|
|
|
'?xml': [
|
|
|
|
|
{
|
|
|
|
|
'#text': ''
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
':@': {
|
|
|
|
|
'@_version': '1.0'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
configuration: [
|
|
|
|
@ -166,11 +169,6 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
|
|
|
|
xmlSource[1].configuration.push({
|
|
|
|
|
packageSourceCredentials
|
|
|
|
|
});
|
|
|
|
|
// If NuGet fixes itself such that on Linux it can look for environment variables in the config file (it doesn't seem to work today),
|
|
|
|
|
// use this for the value above
|
|
|
|
|
// process.platform == 'win32'
|
|
|
|
|
// ? '%NUGET_AUTH_TOKEN%'
|
|
|
|
|
// : '$NUGET_AUTH_TOKEN'
|
|
|
|
|
const xmlBuilderOptions = {
|
|
|
|
|
format: true,
|
|
|
|
|
ignoreAttributes: false,
|
|
|
|
@ -181,7 +179,6 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
|
|
|
|
};
|
|
|
|
|
const builder = new fast_xml_parser_1.XMLBuilder(xmlBuilderOptions);
|
|
|
|
|
const output = builder.build(xmlSource).trim();
|
|
|
|
|
core.debug(output);
|
|
|
|
|
fs.writeFileSync(tempFileLocation, output);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|