mirror of
https://github.com/unraid/api.git
synced 2026-01-04 07:29:48 -06:00
feat: update production release flow to validate less strictly (#1238)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Enhanced error handling during plugin file validation to ensure that any invalid XML inputs are promptly flagged and processed gracefully. - **Chores** - Updated the release workflow configuration to utilize a more flexible XML parsing approach, improving overall validation stability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
17
.github/workflows/release-production.yml
vendored
17
.github/workflows/release-production.yml
vendored
@@ -66,8 +66,23 @@ jobs:
|
||||
|
||||
// Validate the plugin file is valid XML
|
||||
const xml2js = require('xml2js');
|
||||
const parser = new xml2js.Parser();
|
||||
const parser = new xml2js.Parser({
|
||||
explicitCharkey: true,
|
||||
trim: true,
|
||||
explicitRoot: true,
|
||||
explicitArray: false,
|
||||
attrkey: 'ATTR',
|
||||
charkey: 'TEXT',
|
||||
xmlnskey: 'XMLNS',
|
||||
normalizeTags: false,
|
||||
normalize: false,
|
||||
strict: false // Try with less strict parsing
|
||||
});
|
||||
parser.parseStringPromise(pluginContent).then((result) => {
|
||||
if (!result) {
|
||||
console.error('Plugin file is not valid XML');
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('Plugin file is valid XML');
|
||||
|
||||
// Write back to file
|
||||
|
||||
Reference in New Issue
Block a user