Skip to content

Commit

Permalink
SyncTriggers regardless of SKU
Browse files Browse the repository at this point in the history
  • Loading branch information
mathewc authored and ahmelsayed committed Apr 25, 2019
1 parent 11f6834 commit 996196b
Showing 1 changed file with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,26 +335,23 @@ private async Task SyncTriggers(Site functionApp)
{
await RetryHelper.Retry(async () =>
{
if (functionApp.IsDynamic || functionApp.IsElasticPremium)
ColoredConsole.WriteLine("Syncing triggers...");
HttpResponseMessage response = null;
if (functionApp.IsLinux)
{
ColoredConsole.WriteLine("Syncing triggers...");
HttpResponseMessage response = null;
if (functionApp.IsLinux)
response = await AzureHelper.SyncTriggers(functionApp, AccessToken);
}
else
{
using (var client = GetRemoteZipClient(new Uri($"https://{functionApp.ScmUri}")))
{
response = await AzureHelper.SyncTriggers(functionApp, AccessToken);
}
else
{
using (var client = GetRemoteZipClient(new Uri($"https://{functionApp.ScmUri}")))
{
response = await client.PostAsync("api/functions/synctriggers", content: null);
}
response = await client.PostAsync("api/functions/synctriggers", content: null);
}
}
if (!response.IsSuccessStatusCode)
{
throw new CliException($"Error calling sync triggers ({response.StatusCode}).");
}
if (!response.IsSuccessStatusCode)
{
throw new CliException($"Error calling sync triggers ({response.StatusCode}).");
}
}, retryCount: 5);
}
Expand Down

0 comments on commit 996196b

Please sign in to comment.