Skip to content

Instantly share code, notes, and snippets.

@eivindivine
eivindivine / gist:83cbfbf2efb97575ec7c1268459a05a0
Created December 3, 2020 12:33
net-core-appsettings-json-variable-replacement-in-appveyor-deploy.ps1
Write-Host "Environment Variable Substitution"
$prefix = ${env:APPLICATION_PREFIX} + "*"
$props = gci env:$prefix | Select-Object -Property Name, Value
$configPath = "$env:APPLICATION_PATH\$env:CONFIG_FILE"
Write-Output "Loading config file from $configPath"
$appSettings = Get-Content -Raw $configPath | ConvertFrom-Json