public Deployer()
{
try
{
var deploymentConfigContent = System.IO.File.ReadAllText(DEPLOYMENT_CONFIG_JSON);
_deploymentConfiguration = JsonConvert.DeserializeObject<DeploymentConfiguration>(deploymentConfigContent);
}
catch (IOException ex)
{
Log("Stop Error: {0}", ConsoleColor.Red, ex.Message);
Console.ResetColor();
throw new ApplicationException("Error initializing deployment system");
}
try
{
if (System.IO.File.Exists(DEPLOYMENT_CREDENTIAL_JSON))
{
var deploymentCredentialContent = System.IO.File.ReadAllText(DEPLOYMENT_CREDENTIAL_JSON);
_credentialConfiguration = JsonConvert.DeserializeObject<CredentialConfiguration>(deploymentCredentialContent);
}
}
catch {/* ignore errors for credentials config */}
}