vscode-extension icon indicating copy to clipboard operation
vscode-extension copied to clipboard

Renaming xml files on build

Open cotepatrice opened this issue 1 year ago • 0 comments

I see that there are new Filename and PolicyFileName parameters, but there is very little explanation on how to use them. I looked at the source and I was wondering if this could be used to rename xml files on build For exemple, I would like to have some "versioned" files with a suffix in the name to be able to deploy them in my dev tenant without impacting other developpers and testers. I added a custom settings "VersionNumber": "1234" in my appsettings file and used it in my policies like :

<TrustFrameworkPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns="http://schemas.microsoft.com/online/cpim/schemas/2013/06" PolicySchemaVersion="0.3.0.0" 
  TenantId="{Settings:Tenant}" 
  PolicyId="B2C_1A_TrustFrameworkBase{Settings:VersionNumber}" 
  PublicPolicyUri="http://{Settings:Tenant}/B2C_1A_TrustFrameworkBase{Settings:VersionNumber}" 
  TenantObjectId="{Settings:TenantObjectId}">

This produces the files with correct values, but with the same B2C_1A_xxxxx.xml filename in my Environment folder. I'd'like to know if it is possible to rename all the xml files generated in this environment? Like maybe use the PolicyId when generating the name? For exemple, since I modified it in my policy, the xml file should be B2C_1A_TrustFrameworkBase1234.xml

cotepatrice avatar Oct 17 '22 14:10 cotepatrice