Transformation Of JavaScript Files

As part of automation using octopus, im trying to transform java script files. In this case, I’m able to transform with variable names. But coming to octopus, the variable values are not updating based on variables which we gave in octopus…

Please see the below script which i am using

$domainURL = “#{environmentWebBinding}”
$ContentModulesPath = “#{folderPathWeb}Content\Modules”
$GlobalScriptsPath = “$ContentModulesPath\Global\scripts”
$GlobalConfigurationFile = “$GlobalScriptsPath\configuration\GlobalConfiguration.js”
$EntityCMSDataServiceFile = “$GlobalScriptsPath\entities\Entity_CMS_DataService.js”
$EntityMemberDataServiceFile1 = “$GlobalScriptsPath\entities\Entity_Member_DataService.js”

(Get-Content ($GlobalConfigurationFile)) | ForEach-Object {$_.replace(‘localhost’, ‘#{environmentwebbinding}’).replace(‘localhost’, ‘#{environmentwebbinding}’)} | Set-Content -Encoding UTF8 ($GlobalConfigurationFile)

$EntityCMSDataServiceFile = “$GlobalScriptsPath\entities\Entity_CMS_DataService.js”
(Get-Content ($EntityCMSDataServiceFile)) | ForEach-Object {$_.replace(‘localhost’, ‘#{environmentwebbinding}’)} | Set-Content -Encoding UTF8 ($EntityCMSDataServiceFile)

$EntityMemberDataServiceFile1 = “$GlobalScriptsPath\entities\Entity_Member_DataService.js”
(Get-Content ($EntityMemberDataServiceFile1)) | ForEach-Object {$_.replace(‘localhost’, ‘#{environmentwebbinding}’)} | Set-Content -Encoding UTF8 ($EntityMemberDataServiceFile1)

Hi Siddhartha,

Thanks for getting in touch! I’m just letting you know here that I’ve responded to your question at the other thread you’ve raised, and we can continue the investigation there. :slight_smile:

Best regards,

Kenny

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.