diff --git a/.releaserc.cjs b/.releaserc.cjs index e2be963bf9..21f6d9af3e 100644 --- a/.releaserc.cjs +++ b/.releaserc.cjs @@ -15,6 +15,30 @@ `npx semantic-release --branches main` */ +const fs = require("fs"); + +/** + * Function to parse a simple properties file + * @param {string} filePath - Path to the properties file + * @returns {Object} Parsed properties as key-value pairs + */ +function parsePropertiesFile(filePath) { + const content = fs.readFileSync(filePath, "utf8"); + const properties = {}; + + content.split("\n").forEach((line) => { + if (line && !line.startsWith("#") && line.includes("=")) { + const [key, ...valueParts] = line.split("="); + properties[key.trim()] = valueParts.join("=").trim(); + } + }); + + return properties; +} + +// Read your project.properties file +const props = parsePropertiesFile("./project.properties"); + // This project has several runtimes // each one has files that need to be updated. // We model all the files and the runtimes here in this structure @@ -122,6 +146,13 @@ module.exports = { results: Object.keys(Runtimes.net).map(CheckResults), countMatches: true, }, + { + files: Object.keys(Runtimes.net), + from: '', + to: ``, + results: Object.keys(Runtimes.net).map(CheckResults), + countMatches: true, + }, // Update the AssmeblyInfo.cs file of the DotNet projects ...Object.entries(Runtimes.net).flatMap( ([file, { assemblyInfo }]) => ({ diff --git a/DynamoDbEncryption/runtimes/net/DynamoDbEncryption.csproj b/DynamoDbEncryption/runtimes/net/DynamoDbEncryption.csproj index 97639652e0..bddba56f62 100644 --- a/DynamoDbEncryption/runtimes/net/DynamoDbEncryption.csproj +++ b/DynamoDbEncryption/runtimes/net/DynamoDbEncryption.csproj @@ -61,7 +61,8 @@ - + +