mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-25 21:03:06 +07:00
format
This commit is contained in:
parent
26db2473e9
commit
942a0bea39
13
dist/index.js
vendored
13
dist/index.js
vendored
@ -102,11 +102,14 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
|||||||
}
|
}
|
||||||
const xmlSource = [
|
const xmlSource = [
|
||||||
{
|
{
|
||||||
'?xml version="1.0"': [
|
'?xml': [
|
||||||
{
|
{
|
||||||
'#text': ''
|
'#text': ''
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
':@': {
|
||||||
|
'@_version': '1.0'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
configuration: [
|
configuration: [
|
||||||
@ -166,11 +169,6 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
|||||||
xmlSource[1].configuration.push({
|
xmlSource[1].configuration.push({
|
||||||
packageSourceCredentials
|
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 = {
|
const xmlBuilderOptions = {
|
||||||
format: true,
|
format: true,
|
||||||
ignoreAttributes: false,
|
ignoreAttributes: false,
|
||||||
@ -181,7 +179,6 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
|
|||||||
};
|
};
|
||||||
const builder = new fast_xml_parser_1.XMLBuilder(xmlBuilderOptions);
|
const builder = new fast_xml_parser_1.XMLBuilder(xmlBuilderOptions);
|
||||||
const output = builder.build(xmlSource).trim();
|
const output = builder.build(xmlSource).trim();
|
||||||
core.debug(output);
|
|
||||||
fs.writeFileSync(tempFileLocation, output);
|
fs.writeFileSync(tempFileLocation, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,11 +103,14 @@ function writeFeedToFile(
|
|||||||
|
|
||||||
const xmlSource: any[] = [
|
const xmlSource: any[] = [
|
||||||
{
|
{
|
||||||
'?xml version="1.0"': [
|
'?xml': [
|
||||||
{
|
{
|
||||||
'#text': ''
|
'#text': ''
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
':@': {
|
||||||
|
'@_version': '1.0'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
configuration: [
|
configuration: [
|
||||||
@ -176,12 +179,6 @@ function writeFeedToFile(
|
|||||||
packageSourceCredentials
|
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 = {
|
const xmlBuilderOptions = {
|
||||||
format: true,
|
format: true,
|
||||||
ignoreAttributes: false,
|
ignoreAttributes: false,
|
||||||
@ -195,7 +192,5 @@ function writeFeedToFile(
|
|||||||
|
|
||||||
const output = builder.build(xmlSource).trim();
|
const output = builder.build(xmlSource).trim();
|
||||||
|
|
||||||
core.debug(output);
|
|
||||||
|
|
||||||
fs.writeFileSync(tempFileLocation, output);
|
fs.writeFileSync(tempFileLocation, output);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user